Concatenation
How to concatenate several cells (numbers) where one at least contains underlined text. I want to keep the text format after concatenating
MacBook Pro 15", macOS 10.14
How to concatenate several cells (numbers) where one at least contains underlined text. I want to keep the text format after concatenating
MacBook Pro 15", macOS 10.14
You can try this:
The formula in E2:
=CONCATENATE("<html>",A2," ","<b>",B2,"</b>"," ","<i>",C2,"</i>"," ","<span style=","""","text-decoration:underline"">",D2,"</span>","</html>")
The formula marks up the text as html. The script converts that html to rich text format and places it on the clipboard. Select the cell with the concatenated html and command-c to copy. Then run the script by clicking the triangle 'run' button in Script Editor (make sure Script Editor and Numbers.app are listed and checked at System Preferences > Security & Privacy > Privacy > Accessibility. After running the script select the Numbers cell where you want it (I chose F2) and command-v to paste.
The script to copy-paste into Script Editor (in Applications > Utilities). Be sure to copy-paste the whole thing (it scrolls off to the right):
set theHTML to the clipboard as text
set theRTF to do shell script "echo " & theHTML's quoted form & " | textutil -convert rtf -stdin -stdout | pbcopy"
SG
You can try this:
The formula in E2:
=CONCATENATE("<html>",A2," ","<b>",B2,"</b>"," ","<i>",C2,"</i>"," ","<span style=","""","text-decoration:underline"">",D2,"</span>","</html>")
The formula marks up the text as html. The script converts that html to rich text format and places it on the clipboard. Select the cell with the concatenated html and command-c to copy. Then run the script by clicking the triangle 'run' button in Script Editor (make sure Script Editor and Numbers.app are listed and checked at System Preferences > Security & Privacy > Privacy > Accessibility. After running the script select the Numbers cell where you want it (I chose F2) and command-v to paste.
The script to copy-paste into Script Editor (in Applications > Utilities). Be sure to copy-paste the whole thing (it scrolls off to the right):
set theHTML to the clipboard as text
set theRTF to do shell script "echo " & theHTML's quoted form & " | textutil -convert rtf -stdin -stdout | pbcopy"
SG
Hi mllacroix,
Cell content is not the same as formatting.
I tried this with the concatenate operator (&) and the CONCATENATE function. The format does not carry over.
I don't know how to do this. Perhaps an AppleScript Guru will step in with help.
Regards,
Ian
I agree with you, the text format (bold, underlined, italic ...) disappeared after concatenation. To solve this we need to find the AppleScript Guru as you said.
Thanks and regards
Thanks a lot it works
Concatenation