Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
Dear All
I have a worksheet which has a start time and an end time for visits throughout the week, Some lines however are blank I want a formula which tells me if the end of the visit is before 9.30 am to return "morning", if its before 17:00 then return "Afternoon", if its before 23:30 return "Evening" and if its blank return "Ignore" Could anyone help me please ? D -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200810/1 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
=IF(A2<TIME(9,30,),"morning",IF(A2<TIME(17,,),"Aft ernoon",IF(A2<TIME(23,30,),"Evening",IF(A2="","Ign ore","After
evening")))) I am assuming that your cells contain just a time, not a date and time. If the latter, replace each instance of A2 in the formula by MOD(A2,1). -- David Biddulph "dazoloko via OfficeKB.com" <u43760@uwe wrote in message news:8b9ba69d3ea41@uwe... Dear All I have a worksheet which has a start time and an end time for visits throughout the week, Some lines however are blank I want a formula which tells me if the end of the visit is before 9.30 am to return "morning", if its before 17:00 then return "Afternoon", if its before 23:30 return "Evening" and if its blank return "Ignore" Could anyone help me please ? D -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200810/1 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Formula
Thank you both for the repsonses, between the two I got it nailed.
Thanks for your time. D David Biddulph wrote: =IF(A2<TIME(9,30,),"morning",IF(A2<TIME(17,,),"Af ternoon",IF(A2<TIME(23,30,),"Evening",IF(A2="","Ig nore","After evening")))) I am assuming that your cells contain just a time, not a date and time. If the latter, replace each instance of A2 in the formula by MOD(A2,1). -- David Biddulph Dear All [quoted text clipped - 10 lines] D -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200810/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|