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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,636
Messages
6,120,668
Members
448,977
Latest member
moonlight6

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