Excel thinks it's night when it's actually day...

ChemicalGirl

New Member
Joined
Apr 8, 2014
Messages
1
I’ve created a spreadsheet to calculate the length of time it’s going to me take to walk a point to point hike later this year. It’s a 100km walk and some of it is done at night, so I want to use a different walking speed during the night period (21.00 to 05.30) as I’m pretty sure we will be slower at that point.

I’m using the following formula to calculate the time to cover the distance between checkpoints to calculate arrival time at a checkpoint:

=IF(OR(J10>=$H$19,J10<=$H$20),(C11/$N$3),(C11/$N$2))

J10 is the time I leave the checkpoint, H19 is the time at which “night walk pace” starts, H20 is the time at which “day walk pace” starts, C11 is the distance from that checkpoint to the next, N3 is the night walking pace and N2 is the day walking pace.

It all works fine for the first 6 or so checkpoints – day speed is used for the day, then it switches to the night speed after 21.00. But the problem is the following morning – it isn’t recognising that 06.00 the following day is later than 05.30, so it’s still using the night speed for the rest of the hike.

Now it probably doesn’t matter – I’m sure by that point I won’t be walking particularly fast – but it’s really bugging me. I think it must have something to do with the fact that Excel thinks that 06:00 on day 2 is in fact later than 21:00 because if I change J10 to a hard figure rather than a calculation (time on leaving previous stop + time to cover distance to next check point), it all works fine.

How do I adjust the formula? Or reformat the times, perhaps?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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