IF FUNCTION

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.
 
J

jaf

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
 
X

xlmate

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
 
R

Ragdyer

This is a little shorter:

=IF(B3<>8,0,((3*B8)+(4*B9)+(8*B10))+B6*((B7=16)*0.75+((B7=24)*0.5)))
 
R

Ragdyer

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))
 
G

Gulfman100

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
 
G

Gulfman100

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
 

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

Top