Grouping Times

J

Jamesy

Hi All,

I'm hoping this will be an easy answer, heres my query...

00:01 - 12:00 = 1, 12:01 - 18:00 = 2, etc etc

A B
12:45 2
11:41 1
00:25 1
13:15 2
14:54 2

Now from the criteria above I would like column B to show 1's & 2's etc etc.

Any ideas guys??

Thanks,
James.
 
T

Toppers

Try:

Hours are divide by 24 to get Excel representation i.e 24 hours 1.0, 12
hours=0.5

=IF(A2>(18/24),3,IF(A2>(12/24),2,1))

HTH
 
Top