Possible to match one group of cells with another group, but only in one direction?

fisjon09

New Member
Joined
Jan 26, 2016
Messages
3
I have a group of random, possibly repeating numbers in column A and another group of non-repeating numbers in column B. I ultimately want to highlight the numbers in column A that are the same as column B's numbers.

I could do this with the default highlight conditional formatting rule, but doing this would highlight numbers in A even if they don't exist in B. Are you following? :)

Take this as an example:

AB
51
82
83
124
25
06
47
188
19
1810

<tbody>
</tbody>

I need a way to highlight the 5, 8, 2, 0, 4, and 1 in column A by using column B's values, but without highlighting numbers that don't exist in B, like 0, 12, and 18, even though 18 is repeating and would show up in a standard duplicate value rule.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Welcome to the Forum!

You could conditionally format A1:A10 using the formula: =COUNTIF(B$1:B$10,A1)

Excel 2010
AB
151
282
383
4124
525
606
747
8188
919
101810

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
1
 
Upvote 0
Welcome to the Forum!

You could conditionally format A1:A10 using the formula: =COUNTIF(B$1:B$10,A1)

Excel 2010
AB
151
282
383
4124
525
606
747
8188
919
101810

<tbody>
</tbody>
1

Thanks! I wish I'd found this place sooner.

So maybe I didn't explain enough of what I'm actually after.

My actual spreadsheet has column A through G filled with random, sometimes repeating data. I need to highlight any cell that is the same as the numbers in column H. So it's just like this example I gave, except that there are a few more columns of data in addition to the A column here.

Does that make sense?

Thanks for the answer, by the way. I've used countif many times before and was excited when I saw it in your response, but now I'm not sure if I can use it for what I need.
 
Upvote 0
Do you mean like this?

A1:G10 conditionally formatted using formula: =COUNTIF($H$1:$H$5,A1)

Excel 2010
ABCDEFGH
1465861022
243354244
35551061056
4819728108
5272326610
62692435
71542291
884443710
94959353
107545515

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
1
 
Upvote 0
Do you mean like this?

A1:G10 conditionally formatted using formula: =COUNTIF($H$1:$H$5,A1)

Excel 2010
ABCDEFGH
1465861022
243354244
35551061056
4819728108
5272326610
62692435
71542291
884443710
94959353
107545515

<tbody>
</tbody>
1

Genius! Thanks so much!!
 
Upvote 0

Forum statistics

Threads
1,215,152
Messages
6,123,323
Members
449,094
Latest member
Chestertim

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