View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Calculating days and hours

=INT(A1) & " days " & 8*MOD(A1,1) & " hours" sounds like the answer to your
original question, but in your message below you have confused me when in
one breath you are referring to weeks and days (in some system where there
are apparently 8 days in a week!) and in another breath you are referring to
days and hours.
--
David Biddulph

"Woodturner" wrote in message
...
Thanks for the reply. I was thinking in terms of 8 hr. work days where
.375
days would be 3 hours. (Didn't everyone think that?) I'm not a programmer,
so
here is an example that may explain what I want to do better than me.

Ex. - 41 vacation hrs. equates to 5.125 weeks, or 5 weeks and one day. I
need to divide the original number of hrs. by 8 to get whole weeks, and
then
multiply the decimal remainder by 8 to get the number of additional hours.

Can I use the MOD function some way to calculate the number of hours after
taking off the number of days? Maybe (n1 MOD n2)*8, where n1 is the
begininning number of vacation hours, and n2 is 8.

Have I been wordy enough?

Thanks again.

"JE McGimpsey" wrote:

Hmmm.. 12.375 days would translate to 12 days 9 hours, wouldn't it?

IF (a) all your time spans are less than 32 days, and (b) you're using
the 1900 date system, you could just choose Format/Cells/Number/Custom:

d "days" h "hrs."

(which will round to the nearest hour).

Otherwise you could use

A1: 12.375
B1: =INT(A1) & TEXT(A1," \da\y\s h \hr\s.")


In article ,
Woodturner wrote:

How can I convert decimal days, eg 12.375 days, to days and whole
hours? Ex.
12 days 3 hrs.?