I have a column with some values of times, like below format:
Cell B1 = 3/8/2013 13:00
Cell B2 = 3/22/2013 0:25
Cell B3 = 2/28/2013 13:52
I have to calcuate Time on AM/PM basis as per below instruction:
= If(Cell B1< "01:00:00 PM", 8, 0)
I simply tried to apply this formula to convert the time into text >---> =TEXT(Cell B1,"hh:mm:ss am/pm")
So now it gives me result as GivenTime = 3/8/2013 1:00:06 PM
= If(GivenTime < "01:00:00 PM", 8, 0)
... but it is not giving me the correct result, Can anyone please help me to figure it out.
Thanks in advance!
Last edited by SunOffice; 05-02-2013 at 11:10 PM.
Reason: Explained more...
Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!
I made a fool of myself with Text before on this forum. You have to do tests like yours on the binary format, not a text one.
So although you can set the format of the cells as you show, you can't use text. Just set as a custom format. Then your formula becomes =hour(A1)<13 which returns True or False. or to get your result
Bookmarks