IF FUNCTION

  • Thread starter Thread starter Gulfman100
  • Start date Start date
G

Gulfman100

he following formula
=IF(B3=8,IF(B7=16,(B6*12/16)+(3*B8)+(4*B9)+(8*B10),(IF(B7=24,(B6*12/24)+(3*B8)+(4*B9)+(B10*8),0))))

Works well if the first condition B3=8 is met and returns the correct value.
The problem is that when that condition is not met the formula returs FALSE,
I want it to print 0. Every option I have tried has failed. The error always
says to many arguments have been entered.

Thanks in advance for any help.
 
Hi,
Try adding a 0 to the closing ")"

=IF(B3=8,IF(B7=16,(B6*12/16)+(3*B8)+(4*B9)+(8*B10),(IF(B7=24,(B6*12/24)+(3*B8)+(4*B9)+(B10*8),0))),0)


John
 
try adding a 0 at the end of the formula

=IF(B3=8,IF(B7=16,(B6*12/16)+(3*B8)+(4*B9)+(8*B10),(IF(B7=24,(B6*12/24)+(3*B8)+(4*B9)+(B10*8),0))),0)

HTH
--
Pls provide your feedback by clicking the Yes button below if this post have
help you. This will help others to search the archives for result better.


Thank You

cheers, francis
 
This is a little shorter:

=IF(B3<>8,0,((3*B8)+(4*B9)+(8*B10))+B6*((B7=16)*0.75+((B7=24)*0.5)))
 
Left out a condition.
By the time I added it in, this is only slightly shorter:

=IF(B3<>8,0,IF(OR(B7={16,24}),((3*B8)+(4*B9)+(8*B10))+B6*((B7=16)*0.75+((B7=
24)*0.5)),0))
 
That works, Thank you!
Best Wishes

xlmate said:
try adding a 0 at the end of the formula

=IF(B3=8,IF(B7=16,(B6*12/16)+(3*B8)+(4*B9)+(8*B10),(IF(B7=24,(B6*12/24)+(3*B8)+(4*B9)+(B10*8),0))),0)

HTH
--
Pls provide your feedback by clicking the Yes button below if this post have
help you. This will help others to search the archives for result better.


Thank You

cheers, francis
 
That Works, THANKS!

jaf said:
Hi,
Try adding a 0 to the closing ")"

=IF(B3=8,IF(B7=16,(B6*12/16)+(3*B8)+(4*B9)+(8*B10),(IF(B7=24,(B6*12/24)+(3*B8)+(4*B9)+(B10*8),0))),0)


John
 
Back
Top