Search a cell for specific 'special characters' and color the cell red if found

Patje picture Patje · Sep 27, 2013 · Viewed 56k times · Source

I want to search a column of cells for any of these special characters:

` ‘ “ \ / ^

If present (that can also be like C2="fruit\"), I want the cell to return a red color.

I know I should use conditional formatting for this and a find function... but how do I combine it with all the characters?

Thx for the help.

Answer

Siddharth Rout picture Siddharth Rout · Sep 27, 2013

To do this via Excel formulas, you will have to use Helper Columns.

Let's say you have some text in Col A as shown in the pic below

enter image description here

Next Type your special characters say in E1:E6

Next in B1, type this formula

=SUM(IF(ISERROR((FIND($E$1:$E$6,A1))),0,1))

and press CTRL + SHIFT + ENTER and copy the formula down.

enter image description here

Next highlight COl A and in Home | Conditional Formatting | New Rule, Select Use a Formula to determine which cells to format

Next Type the formula =$B1>0 as shown in the screenshot and you are done

enter image description here

This is the output

enter image description here

Hide Col B/E if needed.