ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Making a cell change time to hours (https://www.excelbanter.com/excel-worksheet-functions/199078-making-cell-change-time-hours.html)

Djbaker70

Making a cell change time to hours
 
What I'm trying to do is take a cell with the time at 13:30 and then what I
need to do in the next cell to the right is show no more then 8 hours, then
the next cell to the right of that must show the overage which would be 5.5
hours. If there is any help please let me know . Here is what I'm trying to
do for an example.

D5 is 13:30, E5 would be 8 then F5 would be 5.5 If time was less then 8
hour it would be D5 7, E5 would be 7 and F5 would be 0.

Héctor Miguel

Making a cell change time to hours
 
hi, Dennis !

What I'm trying to do is take a cell with the time at 13:30 and then
what I need to do in the next cell to the right is show no more then 8 hours
then the next cell to the right of that must show the overage which would be 5.5 hours.
If there is any help please let me know . Here is what I'm trying to do for an example.

D5 is 13:30, E5 would be 8 then F5 would be 5.5
If time was less then 8 hour it would be D5 7, E5 would be 7 and F5 would be 0.


[E5] =min(d5,8/24)
[F5] = d5-e5

hth,
hector.

p.s. you could review your previous post (yesterday) :)



Héctor Miguel

Making a cell change time to hours
 
hi (again), Dennis !

other approach, if you don't want to see time format in the result cells..

[E5] =min(hour(d5),8)
[F5] =d5*24-e5

probably F5 needs to be (re)formatted

hth,
hector.

__ OP __
What I'm trying to do is take a cell with the time at 13:30 and then
what I need to do in the next cell to the right is show no more then 8 hours
then the next cell to the right of that must show the overage which would be 5.5 hours.
If there is any help please let me know . Here is what I'm trying to do for an example.

D5 is 13:30, E5 would be 8 then F5 would be 5.5
If time was less then 8 hour it would be D5 7, E5 would be 7 and F5 would be 0.


[E5] =min(d5,8/24)
[F5] = d5-e5





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

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