Dum IF statement question!

jackmccarthy

New Member
Joined
Feb 1, 2013
Messages
32
Hello
I have a calculated column in powerpivot that has numbers 0 thur 24 called "hour of day" That represent the hours of the day.
I need to say if the hour is 0 to 8 "GRAVE" 8 TO 16 "DAY" AND 16 TO 24 "SWING". Can someone please give me the =if statement for this?

This is what I have. Not working
=IF([hour of day]<8,"GRAVE",IF([hour of day]<16,"DAY","SWING"))THANKS </pre>
 
[hour of day] is [datetimestamp],"HH" The [datetimestamp] is 9/24/2012 12:50:58 pm Hope that is what your looking for.
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
MD610 is right on point.

Explanation: formatting a date has no impact on its value. When compared to a numeric value, your date (9/24/2012 12:50:58 pm) will be casted to a numeric value as well (41176.53... in that case). For any recent dates this number will always be larger than 16.
 
Upvote 0
that work perfectly Thanks!!!!!! please see other post from today. If anyone can help there I will by you all drinks!!!!
 
Upvote 0

Forum statistics

Threads
1,223,937
Messages
6,175,510
Members
452,650
Latest member
Tinfish

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