Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Need IF statement to categorize time into "Morning", "Afternoon", "Evening"
I have a column of time stamps that I need to group into
- Morning: 4AM - 11AM - Afternoon: 11:01AM - 3PM - Evening: 3:01PM - 3:59AM Can you help? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need IF statement to categorize time into "Morning", "Afternoon", "Evening"
Hi,
Am Thu, 6 Jun 2013 16:06:21 +0100 schrieb JFi I have a column of time stamps that I need to group into - Morning: 4AM - 11AM - Afternoon: 11:01AM - 3PM - Evening: 3:01PM - 3:59AM try: =IF(AND(A1=TIME(4,,),A1<TIME(11,,)),"Morning",IF( AND(A1=TIME(11,,),A1<TIME(15,,)),"Afternoon","Eve ning")) Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#3
|
|||
|
|||
Hi
Another way would be the LOOKUP function: =LOOKUP(A1,{"00:00","04:00","11:00","15:00"}+0,{"E vening","Morning","Afternoon","Evening"}) You will have to remove the space after the "O" in morning as this site keeps on inserting the space for some reason!!!! Last edited by Kevin@Radstock : June 8th 13 at 04:11 PM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need to display "Good Morning" or "Good Evening" based on NOW() | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |