Guru Excel Programmers:
Is there any way I can make text in the same cell different colors
using VBA? If so, any pointers?
Guru Excel Programmers:
Is there any way I can make text in the same cell different colors
using VBA? If so, any pointers?
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
"avarga82@gmail.com" wrote:
> Guru Excel Programmers:
>
> Is there any way I can make text in the same cell different colors
> using VBA? If so, any pointers?
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks