IF function on Time

Shinianne

New Member
Joined
Aug 6, 2018
Messages
24
Office Version
  1. 365
Hi can I please ask for help is it possible to use IF to Time?


If its between 08:00 - 15:59 CST time it will be AMER
If its between 16:00 - 23:59 CST Time APAC
If its between 00:00 - 07:59 CST Time EMEA


I tried =IF(AB2<TIME(15,59,0),"AMER",IF(AB2<TIME(23,59,0),"APAC",IF(AB2<TIME(7,59,0),"EMEA")))


and its not working :(
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
if your time in A1, try

=IF(A1>=TIME(16,0,0),"AMER",IF(A1>=TIME(8,0,0),"APAC","EMEA"))
 
Last edited:
Upvote 0
if your time in A1, try

=IF(A1>=TIME(16,0,0),"AMER",IF(A1>=TIME(8,0,0),"APAC","EMEA"))


Hi I tried it but its not falling on the criteria,

[TABLE="width: 153"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Time[/TD]
[TD]REGION[/TD]
[/TR]
[TR]
[TD]04:27:01[/TD]
[TD]AMER[/TD]
[/TR]
[TR]
[TD]04:23:46[/TD]
[TD]AMER[/TD]
[/TR]
[TR]
[TD]03:36:45[/TD]
[TD]AMER[/TD]
[/TR]
[TR]
[TD]03:17:53[/TD]
[TD]AMER[/TD]
[/TR]
</tbody>[/TABLE]

Its showing AMER on 4:00:00 CST which should show as EMEA
 
Upvote 0
works for me


Book1
AB
1TimeREGION
204:27:01EMEA
304:23:46EMEA
409:36:45APAC
523:17:53AMER
Sheet1
Cell Formulas
RangeFormula
B2=IF(A2>=TIME(16,0,0),"AMER",IF(A2>=TIME(8,0,0),"APAC","EMEA"))
 
Upvote 0
works for me

AB
TimeREGION

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]04:27:01[/TD]
[TD="bgcolor: #E2EFDA"]EMEA[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]04:23:46[/TD]
[TD="bgcolor: #E2EFDA"]EMEA[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]09:36:45[/TD]
[TD="bgcolor: #E2EFDA"]APAC[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]23:17:53[/TD]
[TD="bgcolor: #E2EFDA"]AMER[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B2[/TH]
[TD="align: left"]=IF(A2>=TIME(16,0,0),"AMER",IF(A2>=TIME(8,0,0),"APAC","EMEA"))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

The formula for my time is =TEXT(L2,"HH:MM:SS") if i use the formula it wouldnt work for me ..
 
Upvote 0
The formula for my time is =TEXT(L2,"HH:MM:SS") if i use the formula it wouldnt work for me ..

Hi, what exactly do you have in L2? If it's a date and time and the text() function is an attempt to extract just the time then use this formula instead and apply a number format of HH:MM:SS to display it the way want.

=MOD(L2,1)
 
Upvote 0

Forum statistics

Threads
1,225,754
Messages
6,186,826
Members
453,377
Latest member
JoyousOne

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