简体   繁体   中英

Excel Time Zone Conversion

I have a whole bunch of data that's in military time format ie

2300
800
etc.

Some of it is in CST and the other US time zones, except EST but I need to make everything into the EST format in excel, and the time zone info (CST etc) is in a separate column. And the data needs to remain in its current format. (like not turning it in 8:00pm etc)
Any help with which formula and how to format it would be much appreciated.

Create a table with the conversions:

在此处输入图片说明

Then use a Vlookup in an If to deal with the over 2400 hrs.

=IF(A1+VLOOKUP(B1,F:G,2,0)>2359,A1+VLOOKUP(B1,F:G,2,0)-2400,A1+VLOOKUP(B1,F:G,2,0))

在此处输入图片说明

For now here are a few suggestions:

  1. The basic formula I would recommend using would be this one:

    =IF((G10+300)>2400,(G10+300)-2400,(G10+300))

Where G10 is your original cell and 300 is the number of hours you are adding ( all hours will be multiples of 100). To ensure you don't get times like 29:00 you need to test the result then subtract 2400 if it went over. The same test will need to be done for a negative time like -200

=IF((G12-300)<0,(G12-300)+2400,(G12+300))

Now you have to replace 300 with the actual time zone difference you want to calculate. To do that you'll need to use the Vlookup function and create yourself a table like this:

Amount    Time Zone 
300    …
200    …
100    AST
0    EST
-100    CST
-200    MST
-300    PST

The VlookUp will return the value of column 1 when it finds the value "CST" or whatever zone you tell it to look up. Change the order of the values in this "Master Table" around depending on where you are starting from.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM