ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Mutliple fonts within cell (https://www.excelbanter.com/excel-programming/342212-mutliple-fonts-within-cell.html)

Blue Aardvark

Mutliple fonts within cell
 
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

Dave Peterson

Mutliple fonts within cell
 
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.)

Blue Aardvark wrote:

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


--

Dave Peterson


All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com