Hi All,
Does anyone know how to change the color of characters in a cell based
of a cell reference.
For example, cell A1 = "||||||||||" (contains 10 "|") I want the first
4 "|" to be Red and the second 6 to Blue. Based of cells A2 = 4 and A3
= 6.
Any ideas?
Thanks!!
-Kim
Dave Peterson - 22 Mar 2008 01:33 GMT
Check your other post.
> Hi All,
>
[quoted text clipped - 10 lines]
>
> -Kim

Signature
Dave Peterson
Gord Dibben - 22 Mar 2008 02:57 GMT
Sub CellFont()
Dim rng1, rng2 As Integer
rng1 = Range("A2").Value
rng2 = Range("A3").Value
With ActiveCell.Characters(Start:=1, Length:=rng1).Font
.ColorIndex = 3
End With
With ActiveCell.Characters(Start:=rng1 + 1, Length:=rng2).Font
.ColorIndex = 5
End With
End Sub
Gord Dibben MS Excel MVP
>Hi All,
>
[quoted text clipped - 10 lines]
>
>-Kim