Formula For Conditional Formatting

JEF13

Board Regular
Joined
Jun 30, 2018
Messages
51
Office Version
  1. 2019
We use Excel to track appointments for a podcast.
I'd like to create a conditional formula that highlights a cell in red if the date of publication of the podcast is before the person records an interview.

The sheet is divided into two areas. The top of the sheet shows us when each episode airs and the name of the guest. The columns are as follows:

Guest Name: A2 to A106
Date for when the episode airs: B2 to B106

The bottom of the sheet is when we book the actual podcast interview. The columns are as follows:

Date of interview: A114 to A217
Name of guest: B114 to B217

The formatting would do the following:

1. For the name in cell A2 AND the date in cell B2 find the same name in cells B114 to B217
2. Compare the date in cell B2 with the date for the same name in A114 to A217
3. If the date in cell B2 is AFTER the date in cells A116 to A217 than nothing happens
4. If the date in cell B2 is BEFIRE the date in cells A116 to A217 than the cell turns red


Thanks for your help!
 
Try:

Book1
AB
1NameDate
2Bob2/1/2025
3Andy4/1/2025
4Esme1/1/2025
5Chantel1/2/2025
6
7
8
113NameDate
114Andy3/2/2025
115Bob2/28/2025
116Chantel1/2/2025
117Esme1/31/2025
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B5Expression=B2<VLOOKUP(A2,$A$114:$B$217,2,0)textNO


If you want it to highlight if the date is equal, change the < to <=.
 
Upvote 0
Solution
Maybe something like

=countifs($A$114:$A$217,$A2,$B$114:$B$217,"<"&$B2)>0

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

Highlight applicable range >>
A2 to B106- 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:
=countifs($A$114:$A$217,$A2,$B$114:$B$217,"<"&$B2)>0

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

Book1
AB
1NameDate
2Bob2/1/2025
3Andy4/1/2025
4Esme1/1/2025
5Chantel1/2/2025
6
7
8
113NameDate
114Andy3/2/2025
115Bob2/28/2025
116Chantel1/2/2025
117Esme1/31/2025
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B5Expression=B2<VLOOKUP(A2,$A$114:$B$217,2,0)textNO


If you want it to highlight if the date is equal, change the < to <=.

Perfect, worked as intended. Thanks Eric!
 
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