conditional formating

biglb79

Active Member
Joined
Oct 17, 2007
Messages
303
Office Version
  1. 2019
Platform
  1. Windows
Is there a way I could setup conditional formatting for company names in cells A6:A493 to turn green if they are listed in any of the names in cells D6:D120?

Thanks
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
You could try this, highlight the range of Cells you want to turn green, then click on CF (Conditional Formatting) and add a new formula.

Put this in:

Code:
=COUNTIF($D$6:$D$120,A61)>0

Then set your formatting to what you want to happen.

See if that works.
 
Upvote 0
or maybe I spoke too quickly because I saw company names highlighted. it doesn't look like it worked correctly
 
Upvote 0
What do you mean by "company names highlighted"?

Can you be more descriptive about what is wrong?

Based on what you stated the formula works for me but I may have misunderstood what you needed.
 
Upvote 0
perhaps I'm doing it wrong on my end too, but I have a long list of companies for the quarter. they are the ones in cells A6:A493 and I highlighted all of those before clicking on conditional formatting to add the new rule. D6:D120 are the companies I want highlighted in column A if they are listed in column D. It highlighted some companies that aren't in column D when I put in the formula above
 
Upvote 0
It sounds like you do not have the formulas aligned with the range you are selecting.

Note the formula he gave you:
Code:
=COUNTIF($D$6:$D$120,A61)>0
That would work for an entry in cell A61.

The way to do this for multiple cells is to first select all the cells you want to apply this Conditional Formatting too.
Then, enter the formula as it pertains to the very first cell in your selection.
If you use absolute/relative referencing correctly, Excel will automatically adjust it for all other cells.

So, if you are looking to apply this to A6:A493, first select that exact range.
Then, enter this CF formula:
Code:
=COUNTIF($D$6:$D$120,[COLOR=#ff0000]A6[/COLOR])>0
and choose your formatting option.
 
Last edited:
Upvote 0
I see a typo in my formula, it says A61, it should just be A6.

Try and update it and then see if it works.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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