|I've got to admit that this was not as easy as I expected it to be.|
I ended up with code that changes all occurrences of Outlook to Excel and then goes back and "fixes" the cells that contain MAC. (My assumption is that there are far more cells that don't contain Mac than do.)
This was due to a quirk in VBA's use Excel's Replace function that doesn't allow you to skip over cells and not change them.
'Loop through sheets
For numSht = 1 To Sheets.Count
'Search all cells in sheet for "Outlook"
Set o = .Find("Outlook", LookIn:=xlValues, LookAt:=xlPart)
If Not o Is Nothing Then
firstAddress = o.Address
'If "Outlook" found, replace it with "Excel"
o.Replace What:="Outlook", Replacement:="Excel", LookAt:=xlPart
'Find "Excel" within cell just changed and set Font Color to Orange
o.Characters(Start:=InStr(1, o, "Excel"), Length:=5).Font.ColorIndex = 46
'Find the next "Outlook"
Set o = .FindNext(o)
'Handle the error raised after last "Outlook" is replaced.
On Error Resume Next
Loop While Not o Is Nothing And o.Address <> firstAddress
'Fix MAC cells
Set m = .Find("MAC", LookIn:=xlValues, LookAt:=xlPart)
'If "MAC" found, replace "Excel" with "Outlook" and reset Font color
If Not m Is Nothing Then
firstAddress = m.Address
'Bring cell value into VBA, change it and put it back
macCell = m.Value
macCell = Replace(macCell, "Excel", "Outlook")
Sheets(numSht).Range(m.Address) = macCell
m.Font.ColorIndex = xlAutomatic
'Find the next "MAC"
Set m = .FindNext(m)
Loop While Not m Is Nothing And m.Address <> firstAddress
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.