Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This should work:
Sub GreenLetter() Dim s As String Dim c As Range Dim i As Long s = InputBox("Which letter to greenden?") LL = Len(s) If s Like "[!A-Za-z]" Then MsgBox ("Must specify a LETTER") Exit Sub End If For Each c In Selection With c If .HasFormula Then .Value = .Text For i = 1 To Len(.Text) If LCase(Mid(.Text, i, LL)) = LCase(s) Then .Characters(i, LL).Font.Color = RGB(30, 255, 15) Selection.Interior.ColorIndex = [A1].Interior.ColorIndex End If Next i End With Next c End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying To Append String Variable To Another String Variable | Excel Programming | |||
Create Variable Length String Dependent Upon Size List | Excel Programming | |||
How to find out the size of a variable-size array ? | Excel Programming | |||
setting a range variable equal to the value of a string variable | Excel Programming | |||
How do I convert an integer variable to a string variable? | Excel Programming |