tvanwyk
11-02-2007, 04:42 AM
Hi Guys,
I am trying to have the VBA Code run through the text in a range, one charatcer at a time.
The idea is that the code will verfiy if a character is a specific colour, and based on that change the change the individual character's colour accordingly.
Here is the code I am currently using::banghead:
Range("A3:A4").Select
For Each Character In Selection
If Character.Font.ColorIndex = xlAutomatic Then
Character.Font.ColorIndex = 2
Else
End If
If Character.Font.ColorIndex = 1 Then
Character.Font.ColorIndex = 2
Else
End If
If Character.Font.ColorIndex = 13 Then
Character.Font.ColorIndex = 13
Else
End If
If Character.Font.ColorIndex = 5 Then
Character.Font.ColorIndex = 5
Else
End If
Next Character
Please send me your comments and suggestions.
Thanks,
Theuns van Wyk
I am trying to have the VBA Code run through the text in a range, one charatcer at a time.
The idea is that the code will verfiy if a character is a specific colour, and based on that change the change the individual character's colour accordingly.
Here is the code I am currently using::banghead:
Range("A3:A4").Select
For Each Character In Selection
If Character.Font.ColorIndex = xlAutomatic Then
Character.Font.ColorIndex = 2
Else
End If
If Character.Font.ColorIndex = 1 Then
Character.Font.ColorIndex = 2
Else
End If
If Character.Font.ColorIndex = 13 Then
Character.Font.ColorIndex = 13
Else
End If
If Character.Font.ColorIndex = 5 Then
Character.Font.ColorIndex = 5
Else
End If
Next Character
Please send me your comments and suggestions.
Thanks,
Theuns van Wyk