Mutliple fonts within cell

G

Guest

In excel, when editing a string within a cell it is possible to use different
fonts for differents parts of the string. For example, a cell containing
"blue red green" could have the words coloured in the appropriate colour.

Can assigning multiple fonts to a single cell be achieved through vba? Can
the "blue red green" example be achieved just through code?

thanks
 
D

Dave Peterson

Record a macro when you select each portion of the string and hit format|cells
and you'll see the code.

Be aware that if "blue red green" is the result of a formula, then this type of
formatting won't work. (It only works on text constants.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top