How to ignore #DIV/0! error

dbcooper88

New Member
Joined
Dec 3, 2016
Messages
36
Array formula is {=AVERAGE(IF(ISNUMBER(MATCH(I13:I18,SMALL(I13:I18,{1}),0)),(H13:H18)))}. Want to ignore the #DIV/0! error and use the cell in column H corresponding to the I column having the #DIV/0! error.

TIA
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Wrap IFERROR around it, to wit:

=IFERROR(AVERAGE(IF(ISNUMBER(MATCH(I13:I18,SMALL(I13:I18,{1}),0)),(H13:H18))), "")
 
Upvote 0
Wrap IFERROR around it, to wit:

=IFERROR(AVERAGE(IF(ISNUMBER(MATCH(I13:I18,SMALL(I13:I18,{1}),0)),(H13:H18))), "")

Dont want result to be blank. Want result to be the corresponding cell. Error is in column I but their is a number in the corresponding column H which is what I want as the output.
 
Upvote 0
Sorry, I misread your requirement. Perhaps:

=AVERAGE(IF(ISERROR(I13:I18), H13:H18, IF(ISNUMBER(MATCH(I13:I18,SMALL(I13:I18,{1}),0)), H13:H18)))

But in case, I think it would be prudent to wrap the AVERAGE expression with IFERROR in case none of the rows meets your requirements.

PS.... I believe the second parameter of SMALL should be a single value (1), not an array ({1}). Also, I believe SMALL(I13:I18,1) is the same as MIN(I13:I18).
 
Upvote 0
Thanks. Now what if I want to use the minimum value in column I above 0. Seems like I need to use MINIFS but cant get it to work. Came up with MINIFS(I13:I18,I13:I18,">0"), Further I dont think I need the AVERAGE function either as Im not looking for an average. To be clear I want the value in column H corresponding to the minimum value above 0 from column I.
 
Upvote 0
=MINIFS(H13:H18,I13:I18,">0",I13:I18,">0") works for original set of data but not the others. Confused.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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