Conditional Formatting from a set of data

ClarkRD6

New Member
Joined
Oct 11, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi There,
I'm trying to figure out how to use conditional formatting if a number is true in a range of data.

Below are examples of the data. On the first tab 'Pipeline' is there a way to highlight the data in Column B if it equals one of the values in a range of data such as Column E on the Targeted Census Tracts Tab?
Pipeline Tab:
1697066280869.png


Targeted Census Tract Tab:
1697066316293.png
 
Welcome to Mr Excel! The short answer is yes, but could you please post your sheets using the XL2BB add in, or alternatively share your workbook via Google Drive, Dropbox or similar file sharing platform. If you share, remember to make the file available to anyone with the link.
 
Upvote 0
Welcome to the Board!

Select range B2 to last cell in column B with data on your "Pipeline" sheet, go to Conditional Formatting, select "New Rule", and chose the "Use a formula to determine which cells to format" and enter this formula:
Excel Formula:
=COUNTIF('Targeted Census Tracts'!B:B,$B2)>0
Then select your desired formatting option/color and click "OK".

That should do what you want.
 
Upvote 0
Similar approach to Joe (slightly different formula) would look like this in practice:
Book1
ABCDE
1YearMSAstatecountytract
21015.00
31018.00
41052.00
51015.00
61033.50
71036.90
81040.30
91043.70
101047.10
111050.50
121053.90
131057.30
141060.70
151064.10
161067.50
171070.90
181074.30
191077.70
201073.00
Targeted Census Tracts


Book1
AB
1addresstract
21000.00
31000.00
41000.00
51000.00
61000.00
71043.70
81047.10
91050.50
101053.90
111057.30
121011.00
131011.00
141011.00
151011.00
161011.00
171011.00
181011.00
191011.00
201011.00
Pipeline
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:B20Expression=MATCH($B2,'Targeted Census Tracts'!$E:$E,0)textNO
 
Upvote 0
Solution
Similar approach to Joe (slightly different formula) would look like this in practice:
Book1
ABCDE
1YearMSAstatecountytract
21015.00
31018.00
41052.00
51015.00
61033.50
71036.90
81040.30
91043.70
101047.10
111050.50
121053.90
131057.30
141060.70
151064.10
161067.50
171070.90
181074.30
191077.70
201073.00
Targeted Census Tracts


Book1
AB
1addresstract
21000.00
31000.00
41000.00
51000.00
61000.00
71043.70
81047.10
91050.50
101053.90
111057.30
121011.00
131011.00
141011.00
151011.00
161011.00
171011.00
181011.00
191011.00
201011.00
Pipeline
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:B20Expression=MATCH($B2,'Targeted Census Tracts'!$E:$E,0)textNO
This worked!!! Thank you so much, i've been researching this for months and got closed but could never figure it out. I wasn't able to get Joe's formula to work, although I was not receiving an error, so it was picking something up but it wouldn't pull through the way this formula did. I cannot thank you enough!
 
Upvote 0
I wasn't able to get Joe's formula to work, although I was not receiving an error, so it was picking something up but it wouldn't pull through the way this formula did. I cannot thank you enough!
The most common issue people have is they do not align their formula with the range they selected.

For example, instead of selecting from cell B2 to the last row with data in column B, they will select the ENTIRE column B.
However, since the formula I gave starts with looking at B2, the formula and range will be out of alignment (i.e. cell B1 looking at B2, cell B2 looking at B3, etc).
The formula needs to be written to look at the very first cell in the range you selected, and it will adjust itself for all other cells.
 
Upvote 0
This worked!!! Thank you so much, i've been researching this for months and got closed but could never figure it out. I wasn't able to get Joe's formula to work, although I was not receiving an error, so it was picking something up but it wouldn't pull through the way this formula did. I cannot thank you enough!
Glad we were able to help and thanks for the feedback (y) :) Also, please note @Joe4's advice regarding the common issues with CF.
 
Upvote 0

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