Hi All,
Im writing a time sheet for my wife and I have been trying to get a IF statement to return a value depending on what time is selected.
The below statement for the start time works fine and returns a 2 if the start time is 6:00 and a 1 if its 7:00 in field E5
=IF(E5=TIME(6,0,0),"2",IF(E5=TIME(7,0,0),"1","N"))
But if i try to use the same statement for the end time, it only returns N for a false value if i have the time set to either 18:00 or 19:00
=IF(G5=TIME(18,0,0),"2",IF(G5=TIME(19,0,0),"1","N"))
I have tried so many permutations of different time/custom formatting for these fields and still no joy
Capture.PNG
Im not sure if the above pic helps give an understanding of the layout.
Any help would be greatly appreciated.
Thanks
-Fiend
Bookmarks