if(iserror

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
Hello

i am using excel 03.

here is my formula

{=AVERAGE(IF(FREQUENCY(IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)>0,FREQUENCY(IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)))}

it is currently giving me a div/0 error, which is fine

but when i try to add the if(iserror(....it says to many arguments

can someone help? how can i make the div/0 appear as 0?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Adding ISERROR would result in too many nested functions. One solution would be to put that formula in some other cell and reference that cell with ISERROR for your output.
 
Upvote 0
I would imagine Excel 2003 will limit your use of nested IF's. Excel 2007 yielded no errors with the following:

=IF(ISERROR(AVERAGE(
IF(FREQUENCY(
IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),
IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)>0,FREQUENCY(IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)))),"x",(AVERAGE(
IF(FREQUENCY(
IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),
IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)>0,FREQUENCY(IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)))))
 
Upvote 0
I would imagine Excel 2003 will limit your use of nested IF's. Excel 2007 yielded no errors with the following:

=IF(ISERROR(AVERAGE(
IF(FREQUENCY(
IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),
IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)>0,FREQUENCY(IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)))),"x",(AVERAGE(
IF(FREQUENCY(
IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),
IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)>0,FREQUENCY(IF(((INDEX(_Data,0,10)>=$D$10)*(INDEX(_Data,0,10)<=$D$10+6)*(INDEX(_Data,0,21)=K69)),IF(INDEX(_Data,0,12)<>"",MATCH(INDEX(_Data,0,6),INDEX(_Data,0,6),0))),ROW(INDEX(_Data,0,6))-ROW(INDEX(_Data,1,6))+1)))))
If using Excel 2007 or later then you can use the IFERROR function.

=IFERROR(your_formula_here,___)

Where ___ = the result you want to replace any error.

Note that IFERROR will trap all errors, not just #DIV/0! errors.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top