Using Excel 2002. I have 10.3 days on a sheet. I am looking for an equation that would convert the 10.3 days to "10 Days" and "x" hours. We work under a 24hr schedule and are trying to calculate vacation days.
=CONCATENATE(INT(A1)," days ",ROUND((A1-INT(A1))*24,2)," hours")
However, this takes into account a 24 hour day. You probably have an 8 hour work day. In that case change the 24 above to whatever your workday is.
Canadian eh! Check out the new social forum Tek-Tips in Canada. With the state of the world today, monkeys should get grossly insulted when humans claim to be their decendents
I would not recommend concatenation, as it does not result in a REAL Date/Time value.
You already have a value in DAYS on your sheet. This is already in the correct units to manipulate with Date / Time functions.
You should not have to do all these formula acrobatics to calculate what you need. Perhaps you ought to pose what you want to calculate given the known values that you have.
Skip,
Just traded in my old subtlety... for a NUANCE!
Skip is absolutely right. I don`t ask why and as such, I am usually guilty of catering to what people are asking for. In the formula above you have all the ingredients of doing it right.
=Int(a1) will give you the days
and
Round((a1-Int(a1))*24,2) will give you your hours.
You can do some fancy Custom formatting to get what you want.
Canadian eh! Check out the new social forum Tek-Tips in Canada. With the state of the world today, monkeys should get grossly insulted when humans claim to be their decendents
Thanks for all your help today and in the past....
I am very interested in what formula you would suggest for my scenereo.
I tried earlier not to add in additional information that I thought would be useless information. I tried to get to the point. I thought that I had all the information to calculate this request, but for the life of me couldn't figure it out.
I am putting together a sheet to auto calculate each employees vacations based on their years of service and other parameters (see below). Although this is fairly simple on the surface, if an employee uses >12 days (288 hrs)of sick time in the calendar year(usually from an injury, illness, surgery, etc) their following years vacations are reduced by a pro-rated value based on years of service and typical vacations that would have been earned.
If an employee would typically earn 9 - 24hr shifts for their 2010 vacations, but was off 384 hrs(16 shifts) during the 2009 calendar year, then their vacations would calculate based on a typical work year of 122 (24hr)days/shifts per year. This gives us a daily vacation earned of .074 days. So if this employee used 384hrs - which is 96hrs over the 288 as mentioned above. 96hrs/24hrs = 4 days; 4 days x .074 = .296 (.30). This .30 represents .30 days of pro-rated reduction from the 9 days of vacation he would have had. I have all this done to this point, however my end result was 8.70 days of vacation, I needed to convert that to days and hours.
I hope you made it through all that, as mentioned above, I would love to see your formula for my scenereo.
If this is only for display purpose, and NEVER for calculation, as the return value is TEXT...
[tt]
=INT(A2)&TEXT(A2," HH")
[/tt]
where A2 has your days of vacation.
Skip,
Just traded in my old subtlety... for a NUANCE!
That formula didn't do it. The return on my 8.70 days returned "8 16" with your formula.
FYI - The much earlier post that xlhelp posted is working perfect, I was just interested in learning a cleaner formula if there was one. Thanks for your time
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.