A Gantt chart that spans 24 hrs

Bill H

New Member
Joined
Mar 23, 2002
Messages
21
As an exercise, I am trying to adapt the "Tip-of-the-Week" Gantt chart to a 24-hour period.
Anyone know how to get Excel to use times past midnight? (I am using Excel 97)

Assuming:
$E2 - Start Time (8:00 PM)
$F2 - End Time (4:00 AM)
G$1 thru BB$1 - (6:00 AM thru 5:00 AM)
In this list of the 24 hours, 8:00 PM would be in AI$1, and 4:00AM in AY$1.

I have tried the following formulas to trigger the conditional formatting for cell AI2 (where the Gantt line should begin).

Condition 1:(to begin the Gantt line)
=($E2>$F2)+AI$1=($E2>$F2)+$E2

Condition 2: (to end the Gantt line)
=($E2>$F2)+AI$1=($E2>$F2)+$F2

Condition 3: (the middle of the Gantt line)
=AND(($E2>$F2)+AI$1>$E2,($E2>$F2)+AI$1<$F2)

The problem is that nothing works after midnight, even though I've added ($E2>$F2} to get it to add 24 hours if the start time is greater than the end time.

Any help would be greatly appreciated.
Bill H
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I have a good example of a Gantt chart that can easily be converted for Hours:Mins, it's currently Days. Also it actually a chart. If you'd like me to send it I'd be more than happy
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
Members
448,554
Latest member
Gleisner2

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