A simple Conditional formatting question I think!!

Javi

Active Member
Joined
May 26, 2011
Messages
440
Hi All,
In the table below I would like to apply formatting to C2 if its value is found in this range G2:G18
I tried =if(c2=G2:G18) and also =c2=G2:G18 with no luck.
Thanks in advanced

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p> </o:p>
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
try

Code:
CountIf(G2:G18,C2)>0

For info, you don't need the >0 argument on the end, any numeric value other than 0 evaluates to true in a logical test.

You could also use

=MATCH(C2,G2:G18,0)
 
Last edited:
Upvote 0
Thank you both for the reply!! :):)

This is what worked...

=COUNTIF($G$2:$G$18,C2)>0

Could not get it to work without $

Thanks!!!!
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,008
Members
448,935
Latest member
ijat

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