Help with formula

R

Richard

Sometimes A4 has less than a whole number such as .5 The .5 is actually 4
hours.
This formula works fine except when there ia a half day.
Here is the formula that sometimes has a half day
"A4"=IF(DATEDIF(B16,TODAY(),"Y")>11,20,VLOOKUP(DATEDIF(B16,TODAY(),"Y"),K:L,2,0))

"A9"=A4+B3+F4+F5+F6

How can I get this formula to read like (1 Days 4 hours), It now reads
like(1.5 days 0 hours)
Here is the formula giving me the problem
"A12" =A9-CEILING(SUM(HList!D:D)/8,1)&" Days "&MOD(8-SUM(HList!D:D),8)&"
hours"
 
T

Toppers

Richard,
My reading of the formulae is that A9 has days (whole
/half) and SUM(D:D) has hours, and a day is 8 hours.

If this is correct, perhaps something like this is what is required i.e.
Convert the days to hours, subtract the SUM(D:D) hours and then convert
result to days /hours. If you want results to nearest whole/half day then you
will need to adjust the formula.

=INT((A9*8-SUM(D:D))/8) &" Days " & MOD((A9*8-SUM(D:D)),8) &" Hours"

OR

=INT(CEILING((A9*8-SUM(D:D)),4)/8) &" Days " &
MOD(CEILING((A9*8-SUM(D:D)),4),8) &" Hours"

Your current formual in A12 effectively only calculates days/hours on
SUM(D:D) and "ignores" A9.

HTH
 
R

Richard

Yes!!! Thanks so much. Works perfect.

Toppers said:
Richard,
My reading of the formulae is that A9 has days (whole
/half) and SUM(D:D) has hours, and a day is 8 hours.

If this is correct, perhaps something like this is what is required i.e.
Convert the days to hours, subtract the SUM(D:D) hours and then convert
result to days /hours. If you want results to nearest whole/half day then you
will need to adjust the formula.

=INT((A9*8-SUM(D:D))/8) &" Days " & MOD((A9*8-SUM(D:D)),8) &" Hours"

OR

=INT(CEILING((A9*8-SUM(D:D)),4)/8) &" Days " &
MOD(CEILING((A9*8-SUM(D:D)),4),8) &" Hours"

Your current formual in A12 effectively only calculates days/hours on
SUM(D:D) and "ignores" A9.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

more help on INT, MOD 3
INT, MOD help 1
Reading Text and numbers 1
Tweaking formula? 2
help with formula 0
Help with formula? 1
simple math equation 8
formula help 3

Top