#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default If Statement

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If Statement

Try this instead

=HOUR(A2) &":00 to "& HOUR(A2) &":59"

Drag down

Mike

"khicks4u" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default If Statement

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

Regards,
Stefi

€˛khicks4u€¯ ezt Ć*rta:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default If Statement

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?

"Mike H" wrote:

Try this instead

=HOUR(A2) &":00 to "& HOUR(A2) &":59"

Drag down

Mike

"khicks4u" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default If Statement

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

"khicks4u" wrote in message
...
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





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If Statement

Yes,

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

Mike

"khicks4u" wrote:

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?

"Mike H" wrote:

Try this instead

=HOUR(A2) &":00 to "& HOUR(A2) &":59"

Drag down

Mike

"khicks4u" wrote:

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

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If Statement

Hmmm,

That doesn't work and I just noticed Stefi has posted a solution.

Mike

"Mike H" wrote:

Yes,

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

Mike

"khicks4u" wrote:

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?

"Mike H" wrote:

Try this instead

=HOUR(A2) &":00 to "& HOUR(A2) &":59"

Drag down

Mike

"khicks4u" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum if statement with a left statement Eric D Excel Discussion (Misc queries) 4 July 23rd 08 05:31 PM
SUMIF statement with AND statement Eric D Excel Discussion (Misc queries) 2 July 14th 08 07:24 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"