too many arguments

supernam

New Member
Joined
Jul 15, 2019
Messages
7
How can I make this work? I will be forever grateful for your help.

=AVERAGEIF(E16 P16 AA16 H15 P26 AA26 E36 P36 AA36 E46 P46 AA46,"<>0",AA46 P46 E46 E36 P36 AA36 AA26 P26 E26 E16 P16 AA16)
 

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.
Welcome to the Board.

Working with disjoint ranges is always tough. There are some tricks though. First, it appears you want to average a set of numbers if they are not zero. But in your example, the first half of your formula is not the same as the second half. In particular, the first half has H15 in it, and the second half has E26. Is this intentional? Assuming that you intend to have the same list in both places, you can try something like this:

=AVERAGE(IFERROR(1/(1/CHOOSE({1,2,3},E16,E26,P16)),""))

and confirm with Control+Shift+Enter. The array list (in red) should go up to the number of values that follow it. So if you have 4 numbers, it would be:

=AVERAGE(IFERROR(1/(1/CHOOSE({1,2,3,4},E16,E26,P16,P26)),""))


Let us know if this works for you.
 
Upvote 0
Understand and thank you for your help. I tried it and adjusted for the additional values and it works as advertised. This aircraft mechanic can be taught a new trick!
 
Upvote 0

Forum statistics

Threads
1,215,878
Messages
6,127,506
Members
449,385
Latest member
KMGLarson

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