I found a little macro to change all the text between "[" and "]" red in excel. But i can't get it to work in Excel 2010, i get some errors.
Can someone help me debug this? At the end i wish that in my excel sheets everything that is between "[" and "]" changes in font to red and everything thats outside of these criteria is still black.
This is the script i found on this site:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Text As String
Dim Index1 As Long
Dim Index2 As Long
Text = Target.Text
Index2 = 1
Do
Index1 = InStr(Index2, Text, "[")
If Index1 = 0 Then Exit Do
Index2 = InStr(Index1, Text, "]")
If Index2 = 0 Then Exit Do
Target.Characters(Index1, Index2 - Index1 + 1).Font.Color = &HFF
Loop
End Sub