Formula Error

  • Thread starter Thread starter phowe43
  • Start date Start date
P

phowe43

=IF(C2="H",B2,0,If(d2="H",b2,0))

Any thoughts on why I get a message of...

"You've entered too many arguments for this function"


Thanks so much
 
If has three arguments... you have four
1. C2="H"
2. B2
3. 0
4. If(d2="H",b2,0)

I think what you want is this
C2="H",B2,If(d2="H",b2,0))
 
=IF(C2="H",B2,0,If(d2="H",b2,0))

After the first 0 Excel is expecting a closing ")". That's why you get the
error message.

Try one of these:

=IF(C2="H",B2,IF(D2="H",B2,0))

=IF(OR(C2="H",D2="H"),B2,0)
 
Hi,

IF allows only 3 arguments =IF(Test,True,False), you have 4.

It is not clear what you want your formula to do?

But if you are trying to show B2 if C2 or D2 = "H" and 0 otherwise then

=IF(OR(C2:D2="H"),B2,0) (array entered - press Shift+Ctrl+Enter to enter
it)

or without array entry

=IF(C2="H",B2,IF(D2="H",B2,0))
or
=IF(OR(C2="H",D2="H"),B2,0)

If this helps, please click the Yes button

Cheers,
Shane Devenshire
 

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

Back
Top