ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Converting time to a range of time (https://www.excelbanter.com/excel-discussion-misc-queries/136177-converting-time-range-time.html)

sueshe

Converting time to a range of time
 
Is there any way to take a time in a spreadsheet and change it to a time
range? For instance, 13:45 would show as 13:01-14:00 or 2:25 would show as
2:01-3:00?
--
Tasha

Bernie Deitrick

Converting time to a range of time
 
Tasha,

With the time of interest in cell A1:

=TEXT(INT(A1*24)/24,"hh:mm") & "-" & TEXT(INT(A1*24+1)/24,"hh:mm")

HTH,
Bernie
MS Excel MVP


"sueshe" wrote in message
...
Is there any way to take a time in a spreadsheet and change it to a time
range? For instance, 13:45 would show as 13:01-14:00 or 2:25 would show as
2:01-3:00?
--
Tasha




David Biddulph[_2_]

Converting time to a range of time
 
=TEXT(TIME(HOUR(A1-1/24/60),1,0),"h:mm")&" -
"&TEXT(TIME(HOUR(A1-1/24/60)+1,0,0),"h:mm")

Won't cope with an input of 00:00, but in general it's better to use 23:59
or 00:01.
--
David Biddulph

"sueshe" wrote in message
...
Is there any way to take a time in a spreadsheet and change it to a time
range? For instance, 13:45 would show as 13:01-14:00 or 2:25 would show
as
2:01-3:00?
--
Tasha




sueshe

Converting time to a range of time
 
That worked like a charm...thanks so much!!!!
--
Tasha


"Bernie Deitrick" wrote:

Tasha,

With the time of interest in cell A1:

=TEXT(INT(A1*24)/24,"hh:mm") & "-" & TEXT(INT(A1*24+1)/24,"hh:mm")

HTH,
Bernie
MS Excel MVP


"sueshe" wrote in message
...
Is there any way to take a time in a spreadsheet and change it to a time
range? For instance, 13:45 would show as 13:01-14:00 or 2:25 would show as
2:01-3:00?
--
Tasha






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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com