# Enter time and have Platoon cell filled in with 1, 2, or 3

• I am trying to help cadets with their drill schedules. Cell A1 is used to enter the time they are starting their tour(drill). I want cell D1 to populate with the "platoon" that they will be working, either a 1, 2, or 3. There are 3 different platoons. The platoon time parameters are: 1 = 20:00 (8pm) to 03:59 (3:59am). 2 = 04:00 (4am) to 11:59 (11:59am). 3 = 12:00 (12pm) to 19:59 (7:59pm). So, if they enter 08:00 in cell A1, a "2" will appear in cell D1. Thank you.

• Re: Enter time and have Platoon cell filled in with 1, 2, or 3

this should work for you - put in D2
=IF(OR(HOUR(A2)>19,HOUR(A2)<4),1,IF(AND(HOUR(A2)>3,HOUR(A2)<12),2,IF(AND(HOUR(A2)>11,HOUR(A2)<20),3,"")))

see attached

## Files

ETAF

• Re: Enter time and have Platoon cell filled in with 1, 2, or 3

Perhaps
=1+MOD((A1*3)+0.5, 3)

• Re: Enter time and have Platoon cell filled in with 1, 2, or 3

Thank you so much etaf. You code works excellent. Thank you. Thank you too MikeRickson.

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!