Cond Format any word with 'fraud' in it

  • Thread starter Thread starter Lorinda
  • Start date Start date
L

Lorinda

A spreadsheet full of cells with lots of text, no other formula/format. Can I
use conditional formatting to color any word that is like 'fraud' red and
leave the rest alone?
 
Conditional formatting applies to the entire cell--not just a word within a
string of words.
 
Yeah, that's been my experience all afternoon...Is there anything to using
Find/Replace with Formatting to do this? In Excel or Word?
 
The word is part of a text string in a cell or cells?

CF will not color just one word in a cell.

You would need VBA macro to achieve that.

Here is a simple one which colors just the first instance of "fraud" in a
string.

Won't work on words like "fraudulent"

Sub color_String()
Dim rng As Range
Dim Cell As Range
Dim start_str As Integer
Set rng = Selection
For Each Cell In rng
start_str = InStr(Cell.Value, "fraud")
If start_str Then
Cell.Characters(start_str, 5).Font.ColorIndex = 3
End If
Next
End Sub


Gord Dibben MS Excel MVP
 
Nothing built into excel that would allow you to do just change the format of a
single word in a cell that contains multiple words.

MSWord can change the formatting of a single word, though.
 
Back
Top