If Else statement with time range for binning purposes

masuzo

New Member
Joined
Jan 16, 2018
Messages
5
Hi,

I need to perform binning on a time range using if else statement. Can anyone help me with the formula? I can't seem to get it to work...

Attached is the excel screenshot to help show what I am trying to accomplish.

Thanks.
 

Attachments

  • Time if else statement binning.PNG
    Time if else statement binning.PNG
    93.3 KB · Views: 13

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Does this work? I put an early in, you can change that to "".
mr excel questions 5.xlsm
AB
218:36:58Evening
311:08:14Morning
402:58:43Early
510:09:10Morning
615:15:03Afternoon
717:13:34Evening
820:44:53Evening
913:49:56Afternoon
1015:43:34Afternoon
1117:24:51Evening
Sheet12
Cell Formulas
RangeFormula
B2:B11B2=IF(HOUR(A2)<7,"Early",IF(HOUR(A2)<12,"Morning",IF(HOUR(A2)<16,"Afternoon","Evening")))
 
Upvote 1
Solution
Upvote 0
Glad to help. Welcome to the forum.

If you find a post here helpful and provides an answer please mark it as the answer.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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