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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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