If time is between ...., then text (region)

tkeiffer

New Member
Joined
Aug 5, 2005
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Looking to leverage either a formula, macro or even a conversion and VLOOKUP.

I have a cell A1 that contains a data/time in this format which is in EST. Here are two examples:

8/9/2023 14:04
8/8/2023 6:14

8/9/2023 6:14​
8/9/2023 14:04​

The date is irrelevant to me and I'm only interested in the timestamp. In a different cell, B1 for example, I'm looking to convert this to one of three global region/zones. If the timestamp is between 8am and 7pm, then "Americas", if timestamp is between 7:01 pm and 2:00am, then "APAC", if timestamp is between 2:01am and 7:59am, then "EMEA".

Perhaps I can convert the timestamp to a number and do a vlookup in a different tab in the workbook. Maybe there's some sort of nested IF statement that can figure it out. I've tried a number of different approaches but with no success. Can someone help me??? It would be much appreciated!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Try this:

Mr excel questions 66.xlsm
AB
12023-08-09 06:14EMEA
22023-08-09 14:04Americas
tkeiffer
Cell Formulas
RangeFormula
B1:B2B1=IF(HOUR(A1)<=2,"APAC",IF(HOUR(A1)<=8,"EMEA",IF(HOUR(A1)<19,"Americas","APAC")))
 
Upvote 1
Solution
My pleasure. I am happy you found a solution here.

Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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