Conditional formatting - based on a single cell lookup in a range

rfj1001

New Member
Joined
Apr 18, 2017
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I want to change the background colour of a column header (cell C2) to Green only if one of the cells in the column (C3-C12) has the character C in it. Any other characters, or more than one C, etc. should not change the colour.

Can SKS help out as I just can't seem to get a formula that works.

Version is Excel 365

Many thanks

Rob
 
If your intention is to have the column header highlighted if there is only one "C" in only one cell, then try this:

=AND(COUNTIF(C3:C12,"*C*")=1,COUNTIF(C3:C12,"*C*C*")=0)

If it's something else, then try posting an example.

Thanks Tetra201. That was what I was trying to achieve. Works a dream :)
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,216,105
Messages
6,128,859
Members
449,472
Latest member
ebc9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top