ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Formatting-Comparing Two Columns (https://www.excelbanter.com/excel-discussion-misc-queries/86839-conditional-formatting-comparing-two-columns.html)

Tom K

Conditional Formatting-Comparing Two Columns
 

Simple but I can't remember how to do this.

I have two lists that I want to compare. If any of the jobs listed in
the "closed" section match any jobs in the "Open" section the I want
them to be highlighted in the "Closed" section. The colums are sorted
ascendingly but as you see by the "CMAS5016" in red font they are not
right next to each other. They may be a few rows off.

Open Closed
CMAS5005 CMAS5005
CMAS5007 CMAS5006
CMAS5008 CMAS5011
CMAS5010 CMAS5015
CMAS5013 CMAS5016
CMAS5014 CMAS5018
CMAS5016 CMAS5022
CMAS5019 CMAS5023
CMAS5020 CMAS5028
CMAS5021 CMMT5033
CMAS5025 CMMT5034
CMAS5026 CMMT5052
CMAS5027 CMMT5053
CMAS5029 CMMT5055
CMAS5030 EPSO5005
CMAS5031 FEEM5001
CMAS5032 FEEM5002


Thanks in advance! I tried searching previuos threads but I could not
find what I needed.


--
Tom K
------------------------------------------------------------------------
Tom K's Profile: http://www.excelforum.com/member.php...o&userid=12124
View this thread: http://www.excelforum.com/showthread...hreadid=538973


Vito

Conditional Formatting-Comparing Two Columns
 

Use Conditional Formatting from the Format menu as follows:

Select the Open items and select Conditional Formatting from the Format
menu.
Select Formula Is from the 1st drop down menu
Enter =COUNTIF($B$1:$B$17,$A1) in the formula box

where B1:B17 is the Closed item list and A1 is the upper most cell in
the Open item list that you highlighted.

Then click format and pick your formats.

Do the same for the Closed Item list reversing the formula to:

=COUNTIF($A$1:$A$17,$B1)


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=538973


Tom K

Conditional Formatting-Comparing Two Columns
 

Thanks for the help. I think we are close but, it is not highlighting
the ones that match. I can't figure out the pattern it is highlighting.
The right column does not match any in the left column or vice versa.

Here's an example

GLML5013 GLML5022
GLML5014 GLML5023
GLML5016 GLML5025
GLML5017 GLML5026
GLML5018 GLML5027
GLML5019 GLML5028
GLML5020 GLML5029
GLML5021 GLML5030
GLML5024 GLML5033
GLML5025 GLML5034
GLML5026 GLML5035
GLML5027 GLML5036
GLML5030 GLML5037
GLML5031 GLML5038
GLML5032 GLML5041
GLML5038 GLML5042
GLML5039 GLML5044


--
Tom K
------------------------------------------------------------------------
Tom K's Profile: http://www.excelforum.com/member.php...o&userid=12124
View this thread: http://www.excelforum.com/showthread...hreadid=538973


Vito

Conditional Formatting-Comparing Two Columns
 

Not sure what's happening, but that formula should work.

Make sure you select the column range, eg. A1:A17 and enter the formula
=Countif($B$1:$B$17,A1) in the conditional formatting formula box,
adjust the range to cover the entire range. Make sure you use the
$-signs to make the range absolute.

Also go back and look at the formula. Make sure that it is not
enclosed in double-quotes. It should have no quotes around it at all.


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=538973



All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com