Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change color of specific text within a cell?
Guru Excel Programmers:
Is there any way I can make text in the same cell different colors using VBA? If so, any pointers? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change color of specific text within a cell?
Try using the macro recorder to do this, and see the VBA created. You will
want to delete some unwanted lines. Below is an example of what you might see. Range("A1").Select ActiveCell.FormulaR1C1 = "LLLLKKKKMMMM" With ActiveCell.Characters(Start:=1, Length:=4).Font .Name = "Arial" .FontStyle = "Regular" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With With ActiveCell.Characters(Start:=5, Length:=5).Font .Name = "Arial" .FontStyle = "Regular" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = 3 End With With ActiveCell.Characters(Start:=10, Length:=3).Font .Name = "Arial" .FontStyle = "Regular" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With -- Tony Green " wrote: Guru Excel Programmers: Is there any way I can make text in the same cell different colors using VBA? If so, any pointers? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change Font color specific text | Excel Discussion (Misc queries) | |||
Change the color of a cell or text with an if statement | Excel Discussion (Misc queries) | |||
Move text that is a specific color to a different cell | Excel Worksheet Functions | |||
count by specific text color in range of cell | Excel Discussion (Misc queries) | |||
Cell text color change | Excel Discussion (Misc queries) |