Conditional Formatting - check 3 or more cells equal each other?

doug firr

Board Regular
Joined
Mar 28, 2011
Messages
140
Hello

I want to use excel (2007) to validate that various cells that should equal each other throughout a worksheet do in fact equal each other.

Lets say I type in the value "7" along a row so that cells C5:F5 all contain the value 7.

If I type the formula =if(c5=d5=e5=f5,c5,"false") I would want, in this instance, for my formula to return the value "7" or false. I'd also like to make a conditional formatting rule that if true the color becomes green.

This particular formula does not work, it returns false when it should return 7.

I did manage to do this by creating what must be an unnecessarily long ish formula by nesting smaller "if" formulas. Is there an easier way to do this anyone?

cheers
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
As the if function can only validate one condition at a time, you need to nest the if statments inside each other. To change the celle color, you can get the if statement to return "True" and then use conditional formatting to change to the celle color.
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,896
Members
452,948
Latest member
Dupuhini

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