compare 3 values from 3 different cells and COLOR which cell is not matching

aayaanmayank

Board Regular
Joined
Jul 20, 2018
Messages
157
Hi Can someone help me with formula.

compare texts from 3 different cells and COLOR which cell is not matching from remaining 2
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You could use Conditional Formatting. If your 3 cells are A1:C1, then select those 3 cells, click Conditional Formatting > New Rule > Use a formula > and enter:

=COUNTIF($A$1:$C$1,A1)=1

and select a fill color. It's slightly more complicated if the cells are disjoint, or if you have to account for empty cells.
 
Upvote 0
Hi Thanks for you reply. But in this case it only comparing cell A1 to B2 and C2. However i need if any of the cell is different from then it should highlight that cell. Like A1& B2 had same text but C2 had different text so it should highlight C2.
 
Upvote 0
Did you try it?

The formula will do that. Keep in mind that formulas in Conditional Formatting also follow the absolute/relative reference rules. The entire range has $A$1:$C$1 with the $ signs indicating absolute references. The A1 in the second parameter does not have the $ signs, meaning that in the B1 and C1 cells it changes to B1 and C1. You must select all 3 cells when entering the formula. Try that and let me know how it works.
 
Upvote 0
Hi Eric can you check and advise that why it is not working when below string is in a2, b2 & c2. I made one change in formula i am using =COUNTIF($A:$C,A1)=1
ChiragChiragMayank

<tbody>
</tbody>
 
Last edited:
Upvote 0
Are you trying to use the formula on the entire column? If so, the COUNTIF won't work, since it will try to look at the whole column, and not just the row you're on. Instead, you'd have to try this: Select columns A:C. Click Conditional Formatting > New Rule > Use a formula, and this formula:

=AND(A1<>"",(A1=$A1)+(A1=$B1)+(A1=$C1)=1)
 
Upvote 0

Forum statistics

Threads
1,215,497
Messages
6,125,155
Members
449,208
Latest member
emmac

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