Conditional Format Highlight Cells Based on Date Range that corresponds to recurring criteria

mattfj

New Member
Joined
Nov 18, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I am trying to put together a file that shows the date ranges that trucks will be unavailable because of assigned deliveries. The idea is that any date that any cell that is not highlighted shows when they are available to take cargo. I am using the following formula in the conditional formatting:

=IF(COUNTIF($A$13:$A$16,$A$3)>0,AND(E$1>=$B13,E$1<=$C13),"")

As you can see it is highlighting the date range for each truck but it is only highlighting the date range for the first occurrence. I am trying to get it to highlight both of the date ranges that are listed for Truck 1. Please help.
 

Attachments

  • Excel Question.JPG
    Excel Question.JPG
    58.2 KB · Views: 56

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
How about
Excel Formula:
=AND($A3<>"",SUMPRODUCT(($A$13:$A$17=$A3)*($B$13:$B$17<=E$1)*($C$13:$C$17>=E$1)))
 
Upvote 0
Solution
How about
Excel Formula:
=AND($A3<>"",SUMPRODUCT(($A$13:$A$17=$A3)*($B$13:$B$17<=E$1)*($C$13:$C$17>=E$1)))
Sir,

You are a genius. I should have specified that my problem was much bigger than the small example that I gave. However, the solution that you offered me put me on the right track and I was ultimately able to use this to solve my problem. Thank you so much for your help.

Regards,

Matt
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

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