Darren_workforce
Board Regular
- Joined
- Oct 13, 2022
- Messages
- 146
- Office Version
- 365
- Platform
- Windows
Good day,
I am struggling to combine IF and VLOOKUP statements to calculate times based on a time zone. On Data tab I have punch in times and all times are Eastern time due to the timeclock software. I'd like to locate the name of each rep in the Location tab, search Column C to find out their time zone, and then based on that information, subtract the appropriate amount of time from the punch time. (EX: Bob Roberts punched at 10:00am Eastern. Since he lives in Texas and is Central time, the punch time would have 60 minutes subtracted and return a result of 09:00am.) I have nobody in Hawaii or Alaska so I am not currently concerned with those time zones, However if we do hire reps from those states, I would plan on using "Alaska" and "Aleutian" as the Column C designations.
the above is all I've come up with. Where the "not eastern" is would be where it should subtract the appropriate number of minutes but I'm failing to get it to work.
1) What am I missing?
2) How do I factor in all US time zones for this within one formula?
TYIA
I am struggling to combine IF and VLOOKUP statements to calculate times based on a time zone. On Data tab I have punch in times and all times are Eastern time due to the timeclock software. I'd like to locate the name of each rep in the Location tab, search Column C to find out their time zone, and then based on that information, subtract the appropriate amount of time from the punch time. (EX: Bob Roberts punched at 10:00am Eastern. Since he lives in Texas and is Central time, the punch time would have 60 minutes subtracted and return a result of 09:00am.) I have nobody in Hawaii or Alaska so I am not currently concerned with those time zones, However if we do hire reps from those states, I would plan on using "Alaska" and "Aleutian" as the Column C designations.
Excel Formula:
=IF(ISNA(VLOOKUP(B9,'[CST States - Time Zones.xlsx]Sheet1'!$A:$C,3,FALSE))="eastern","not eastern",D9)
1) What am I missing?
2) How do I factor in all US time zones for this within one formula?
TYIA
A | B | C |
John Smith | North Carolina | Eastern |
Bob Roberts | Texas | Central |
Allen Jones | Florida | Eastern |
Will Smith | New Mexico | Mountain |