compare a cell with a cell range?

tuzlak

New Member
Joined
May 25, 2015
Messages
1
Hello,
I'm not any excel authorithy, so please be gentle.

I have a range of cells with certain values. I need to compare each and every cell from that range with each and every cell from a different range of cells. If there are the same cell values, I need to highlight the cell from the second range of cells.

Since the values from the first range are all different from each other, it would be nice if each duplicate cell would have different coulor.

Is this possible to do in excel and if yes, how?

Thank you in advance,
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Duplicates in range2 could be filled with a single color using Conditional Formatting. A VBA subroutine could be written to fill each duplicate with different color.

As an example, suppose range 1 is A2:A20 and range2 is C2:C25, then:

For the former solution you would select all the cells in range2 and go to Home>Conditional Formatting>New Rule>Use a formula. The formula is: =NOT(ISNA(MATCH($C2,$A$2:$A$20,0)))
Then select the color you want for the fill and click OK.

The latter solution (multiple colors) requires that you are willing to enable macros.
 
Upvote 0

Forum statistics

Threads
1,203,650
Messages
6,056,557
Members
444,876
Latest member
VidHuggers

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