Decimal days

  • Thread starter cliffbellis766@
  • Start date
C

cliffbellis766@

Hi
Newish to Excel, so apologies if this a really stupid post.
Doing an annual leave calculator which gives as one its results th
decimal figure of, for example, 33.5 days, i.e. thirty three and a hal
days.
How can I convert this to read 33 days and 12 hours? Have tried al
sorts to no avail.
Many thanks
Clif
 
M

Max

cliffbellis766@ said:
.. Doing an annual leave calculator which gives as one its results the
decimal figure of, for example, 33.5 days,
i.e. thirty three and a half days.
How can I convert this to read 33 days and 12 hours?

One way which might suffice ..

Assuming the results (33.5, etc) are in A2 down

Put in B2:
=IF(A2=0,"",IF(A2=INT(A2),INT(A2)&" days",INT(A2)&" days and
"&(A2-INT(A2))*24&" hours"))

Copy down
 
M

Max

Maybe try this slightly revised formula instead:

Put in B2:
=IF(A2=0,"",IF(A2=INT(A2),INT(A2)&" days",INT(A2)&" days and
"&TEXT((A2-INT(A2))*24,"00")&" hours"))
 
R

Roger Govier

Hi Cliff

One way, with days in A1

=INT(A1)&" days "&MOD((A1*24),24)&" hours"

--
Regards

Roger Govier



cliffbellis766@
 
C

cliffbellis766@

Hello all
Many, many thanks; now got it working. No wonder my brain cell wa
having problems working this one out.
No more staff claiming extra minutes of undeserved leave! Hah! that'l
teach 'em.
Really grateful, although staff are preparing scaffold for me.
Clif
 
Top