Copy Mixed Formatting to New Cell

dedebing

New Member
Joined
Apr 7, 2011
Messages
4
I am trying to come up with a way to have the exact contents of one cell in another cell and retain the text format.

For example: Cell A2 "Item I-34 NVG Inspection - complied with 100 hour inspection. Next due 123.3" and when I link it to another cell, the text formatting is removed and I end up with "Item I-34 NVG Inspection - complied with 100 hour inspection. Next due 123.3" No bold, no italic, no color.

Is there any function/formula that will return the contents of the cell exactly as they are formatted? Using format painter, it picks up just the bold. Any help would be greatly appreciated!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I just recently ran into a similar problem. The short answer is, no, you cannot copy this kind of in-cell formatting. You cannot even read it. You would have to read the XML of the file, find the data elements that need to be formatted in each sheet, and then programmatically modify the styles.xml like so:

Code:
< fonts count="3" x14ac:knownFonts="1">
< font>
< sz val="11"/>
< color theme="1"/>
< name val="Calibri"/>
< family val="2"/>
< scheme val="minor"/>
< /font>
< font>
< sz val="11"/>
< color theme="1"/>
< name val="Calibri"/>
< family val="2"/>
< scheme val="minor"/>
< /font>
< font>
< sz val="11"/>
< color rgb="FFFF0000"/>
< name val="Calibri"/>
< family val="2"/>
< /font>
< /fonts>

All to make everything beginning at character 11 red.

It's not worth it. Your best bet is to make the changes manually, or else program your file to format the values via VBA, at runtime, before each file is saved.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top