"Too many arguements for this function"....ohh noooo....

D

dim

Hi all,
I typed in the following function:

=IF(Wood!I9="y",SUM(Wood!Y13)*(Wood!I13),IF(Wood!K9="y",SUM(Wood!Y13)*(Wood!K13)),IF(Wood!M9="y",SUM(Wood!Y13)*(Wood!M13))

All was fine until I typed in the bit at the end:
,SUM(Wood!Y13)*(Wood!M13))

and I was told I had too many arguements for this function..... I hadn't
even finished my arguements!!

Anyway, I need to write the above, but I need to extend it on from I9,K9 &
M9 as above, to also include O9, Q9, and S9 aswell. I think I might need an
array formula, but I haven't figured them out enough yet to write one myself.
:-(

The cells in question (I9,K9,M9 etc) are blank and if the user puts in a
letter 'y' in any of these cells, then the function has to multiply that
column's cell number 13 (I13,K13,M13 etc) by the value in Y13. I then want to
be able to copy this formula down to keep the I9,K9,M9...(For the 'y' input)
etc the same, but change the row to be multiplied from 13 to 14,15,16,17...
etc

Please help.....
 
D

David Biddulph

Well to start with you can throw away the SUM function where you haven't
given it more than one argument to sum.
You can also throw away the unnecessary parentheses, then you can see more
clearly where you are left with mismatched parentheses or other syntax
problems.
You've effectively got
=IF(Wood!I9="y",Wood!Y13*Wood!I13,IF(Wood!K9="y",Wood!Y13*Wood!K13),IF(Wood!M9="y",Wood!Y13*Wood!M13)

Apart from the mismatched parentheses, you've got 4 arguments for the first
IF, and it only wants 3. Perhaps you intended the 3rd IF to be the
exception result for the 2nd IF?
=IF(Wood!I9="y",Wood!Y13*Wood!I13,IF(Wood!K9="y",Wood!Y13*Wood!K13,IF(Wood!M9="y",Wood!Y13*Wood!M13)))
would be valid syntax, but note that you haven't given an exception result
for the 3rd IF, so by default it will return FALSE.
 
T

Teethless mama

Slightly shorter and more elegant

=IF(Wood!I9="y",Wood!I13,IF(Wood!K9="y",Wood!K13,IF(Wood!M9="y",Wood!M13)))*Wood!Y13
 

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