Highlight times that are equal to or later than

alexfooty

Board Regular
Joined
Dec 30, 2018
Messages
97
Office Version
  1. 2016
Platform
  1. Windows
I will do my best to try to explain my problem.

In Col G I have a list of times (hh:mm) that vary each day and also the number of rows may vary.
In Col BG I have a list of dates with a corresponding time in Col BH.

Image 1.png

I would like to highlight any times in col G that are equal to, or later than, the time corresponding to today’s date in Col BH

In the following example, If today’s date was 05/11/2021, the corresponding time in Col BH would be 09:31. So any times equal to or later than that would be highlighted in Col G

Image 2.png


I hope someone understands this - any help would be greatly appreciated.
 

Attachments

  • Image 1.png
    Image 1.png
    6.7 KB · Views: 0
etaf
One or two discrepancies occasionally crop up.
In the example below the time for the conditional formatting to kick in is 16:35 so anything equal to or later should be shaded.
Image 5.png

Any ideas as to why this might happen?
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
can you post more of the spreadsheet - the lookup section columns
works for me
Book7
ABCD
1
210:03:0010/30/21
316:21:0010/31/21
416:22:0011/1/2111:00:00
516:23:0011/2/2116:35:00
616:24:00
716:25:00
816:26:00
916:27:00
1016:28:00
1116:29:00
1216:30:00
1316:31:00
1416:32:00
1516:33:00
1616:34:00
1716:35:00
1816:36:00
1916:37:00
2016:38:00
2116:39:00
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A21Expression=A2>=(INDEX($D$2:$D$5,MATCH(TODAY(),$C$2:$C$5,0)))textNO
 
Upvote 0
Image 6.png


Cond Format formula =I3>=(INDEX($D3:$D$428,MATCH(TODAY(),$C$3:$C$428,0)))
 
Upvote 0
change the format of the times to general for D & I
 
Upvote 0
did you select the range I3 or I2 - remember the conditional formatting starts at the cell selected
so if you selected I2:I100
But the formula says I3

then stepping through the cond format
it will look at the cell I2 and then use the formula to test
in this case
is I3 > = which I3 is , but because its looking at i2 - it colours I2

the first row of the range selected, needs to also be in the formula
 
Upvote 0
If I change the format of D & I to General - I need Col I to show as hh:mm
I selected I3 as the start of the cond format - there is no cond format formula that refers to cell I2
 
Upvote 0
ok,
i was only suggesting change the format to see here , not forever, just so we know whats going on and if text or a number
the format does not matter , so you can set for whatever you want to see , BUT only ask to do this just during analysis

So you have selected I3:I??? in conditional formatting
and then using

=I3>=(INDEX($D3:$D$428,MATCH(TODAY(),$C$3:$C$428,0)))

I think you would need to add the spreadsheet here using XL2BB or via a share, like dropbox/onedrive
So i can see what I make of the sample sheet you have setup
 
Upvote 0
All now seems well. I re-arranged all the columns to match yours (Cols A, C & D) and used the same cond format formula that you used.
This eliminated any of the previous discrepancies.

Image 7.png

So I then rearranged the columns back to were I wanted them and re-typed the new references in cond format.
And lo and behold - no discrepancies!!!

I even changed the formula to give me a date next April - checked all my figures and all correct.
Sorry to mess you about etaf and thanks again. Your knowledge and patience knows no bounds.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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