Conditional formatting between times (2)

JDK1998

New Member
Joined
Sep 6, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am building a scheduling table with start and end times ... which then populate a "timeline" across the business day.
The business day is a series of columns in 15 minute increments starting at 05:00:00 AM to 10:00:00 PM.
The timeline fills the cells between the start and end times entered.
I found a good post to create the timelines using conditional formatting.
Mr. Excel - Conditional formatting between times

I am using this formula:
=AND(MOD(I$30,1)>=$E31,MOD(I$30,1)<=$F31)

Where I$30 is the first cell of the business day (05:00:00 AM)
$E31 is the start time, $F31 is the end time

However, times after 10:00:00 AM are not applying the conditional formatting to the corresponding first cell (start time) of the timeline (start time).
Visually, it appears that the timeline actually starts 15 minutes later than the entered start time.

Any ideas on how to fix?
Thanks
JDK
 

Attachments

  • Screenshot 2023-09-18 124806.png
    Screenshot 2023-09-18 124806.png
    18.6 KB · Views: 32

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
It looks like rounding errors. Look at this demonstration:

Cell Formulas
RangeFormula
A3A3=A1/A2
B3B3=40626+A3
C3C3=MOD(B3,1)
C5C5=C3=A3
C6C6=C3>A3
C7C7=C3<A3


maybe round all of your numbers to the nearest thousandth or something to make sure this weirdness doesn't happen.
 
Upvote 0
Does this work for you:
Cell Formulas
RangeFormula
H30H30=TIME(5,0,0)
I30:BK30I30=H30+ (15/(60*24))
E31E31=TIME(8,0,0)
F31:F32,E33F31=TIME(9,0,0)
E32E32=TIME(8,45,0)
F33F33=TIME(9,30,0)
E34E34=TIME(10,0,0)
F34,E36F34=TIME(12,0,0)
E35E35=TIME(11,30,0)
F35F35=TIME(12,45,0)
F36F36=TIME(13,10,0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H31:BW36Expression=AND($E31<=H$30,$F31>H$30)textNO
 
Upvote 0
Solution
Thank you both for your suggestions.
awoohaw,
I applied the time formatting you indicated and that resolved the start time formatting.
I then used your suggested formula and that resolved the end time formatting.
All is good and working as desired.
Thanks and all the best.
JDK
 
Upvote 0
I am pleased you found a solution!
Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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