Iserror - too many arguments

S

smartgal

I have the followig formula:

=(if(iserror(HLOOKUP($B7,mm!$2:$23,22, 0),0,HLOOKUP($B7,mm!$2:$23,22, 0))

And I'm getting an error saying too many arguments. Help!

mm
 
J

jamescox

If you'll look at the formula in the formula bar when you get the error,
you will see that the zero show in bold below is also shown in bold in
the formula bar.

Excel is trying to tell you where it thinks the problem is (and don't
argue with Excel!)

=(if(iserror(HLOOKUP($B7,mm!$2:$23,22, 0),*0*,HLOOKUP($B7,mm!$2:$23,22,
0))

Specifically, the iserror function takes one argument and you are
missing a parenthesis to close off the iserror() format:

=(if(iserror(HLOOKUP($B7,mm!$2:$23,22,
0)*)*,0,HLOOKUP($B7,mm!$2:$23,22, 0))

But once you make that change, Excel will count parentheses and tell
you that the ones in your formula don't balance, so the final version
will be

=(if(iserror(HLOOKUP($B7,mm!$2:$23,22, 0)),0,HLOOKUP($B7,mm!$2:$23,22,
0))*)*

In cases like this, it's always good to test out the components of the
formula individually - ie, the iserror part, the lookup part in a cell
formula of their own to find what the problem might be.
 
P

Per Jessen

Hi

You are missing two closing parenthesis:

=(IF(ISERROR(HLOOKUP($B7,mm!$2:$23,22, 0)),0,HLOOKUP($B7,mm!$2:$23;22, 0)))

but you don't need the outer parenthesis:

=IF(ISERROR(HLOOKUP($B7,mm!$2:$23,22, 0)),0,HLOOKUP($B7,mm!$2:$23;22, 0))

Regards,
Per
 
S

smartgal

Me? Argue with Excel? Never!! I did try to add some ( ) but I guess I was
still missing one somewhere. Thanks~!
 

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