If cell value in list in Sheet1 shows up in a cell value in Sheet2, highlight cell

mkasledge1

New Member
Joined
May 20, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet with two sheets. Sheet 1 has a list of selected company names and Sheet 2 has a list of all company contacts along with the company name for each contact. I want to highlight the company name in Sheet 2 if that company name shows up in Sheet 1. There are 906 company names in Sheet 1 and 27,550 contacts in Sheet 2. If the company name next to the contact in Sheet 2 shows up in any of the 906 company names in Sheet 1 I want to highlight that cell a color. If it doesn't show up I don't want it highlighted. I need to do that for all 27,550 contacts (which contains company name) in Sheet 2. I tried COUNTIF but must be doing something wrong and would appreciate your help! Thanks in advance!
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Well, english is not my native language, therefor I keep it short and smart (hopefully ;))
Try MATCH with 3. parameter = 0
 
Upvote 0
a countif() should work

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
Sheet2 range of company names - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=countif( Sheet1range of company names , Sheet2:1st company name) >0

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

here is an example
=COUNTIF(Sheet1!$A$2:$A$18,$A2)>0

Sheet2
Book4
A
1company name
2A1
3A3
4A5
5A7
6A9
7A11
8B1
9B4
10B7
11B10
12B13
13B16
14B19
15A1
16A3
17A5
18A7
19A9
20A11
21B1
22B4
23B7
24B10
25B13
26B16
27B19
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A27Expression=COUNTIF(Sheet1!$A$2:$A$18,$A2)>0textNO


Sheet1
Book4
A
1company name
2A1
3A2
4A3
5A4
6A5
7A6
8A7
9A8
10A9
11A10
12A11
13A12
14A13
15A14
16A15
17A16
18A17
Sheet1


will only be on dropbox for a few days
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

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