Adjust travel time for daylight saving

ozbeachbum

Board Regular
Joined
Jun 3, 2015
Messages
235
Office Version
  1. 2021
Platform
  1. Windows
Don't know if on the right track, I tried the following without success.
=IF(Y19="DST",(W19-U19)-TIME(HOUR(1),IF(Y19="EST",(W19-U19)+TIME(HOUR(1),0)
"W" is Arrival Time "U" is Departure Time.
Any advice or suggestions thanks.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Excel Formula:
=IF(Y19="DST",(W19-U19)-TIMEVALUE("01:00"),IF(Y19="EST",(W19-U19)+TIMEVALUE("01:00"),0))
 
Upvote 0
Solution
Code:
=W19-U19 +TIME(1,0,0)*IF(Y19="DST",1,IF(Y19="EST",-1,0)))
Thanks it works.
I realised after I posted the request that I would also need to allow for more than one day traveling.
I am posting a new request, you might be good enough to take a look and let me know if you can help.
Cheers,
Dave.
 
Upvote 0

Forum statistics

Threads
1,224,034
Messages
6,176,000
Members
452,695
Latest member
Alhassan

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