If Statement

K

khicks4u

I have a column that houses a time. The column may have 2000 rows. I would
like to enter an IF statement in the column next to it to identify what hour
this time falls into, but can it handle 24 possibilities?

Time Result
1330 13:00 to 13:59
1615 16:00 to 16:59
2020 20:00 to 20:59

Thanks Kem
 
S

Stefi

=TEXT(TIME(HOUR(A2),0,0),"hh:mm")&" to "&TEXT(TIME(HOUR(A2),59,0),"hh:mm")

Regards,
Stefi

„khicks4u†ezt írta:
 
K

khicks4u

You are a life saver Mike!!!!! Thank you that worked. Is there a way I can
get the format to be 01:00 to 01:59 instead of 1:00 to 1:59?
 
D

David Biddulph

=HOUR(--TEXT(A2,"00\:00"))&":00 to "&HOUR(--TEXT(A2,"00\:00"))&":59"
or =INT(A2/100)&":00 to "&INT(A2/100)&":59"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top