Average Ifs not working

RoganLogan

New Member
Joined
Dec 7, 2011
Messages
45
Hi

I was trying to use averageifs to average numbers I have in row 1 from A1:AV1 by a corresponding criteria number I have in row 2 from A2:AV2. So if the numbers in the cells in row 1 have a 1 below in the criteria row 2 they are averaged in row 3 and the same for all the other criteria numbers. The criteria numbers in row 2 go from 1 to 20. This is what i want to achieve below with the formula in row 3 giving me the average

10202520405030405010
1112223334
18.3318.3318.3336.6636.6636.6640404010

<tbody>
</tbody>


I tried using avergeifs but have since discovered that averageifs works on AND condition not OR. So I've tried using array formulas but still cant get it to work. Any help would be greatly appreciated.

Many thanks,

RL
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try this in A3 and drag to the right:

=AVERAGEIFS($A$1:$AV$1,$A$2:$AV$2,A2)
 
Upvote 0
Hard to follow.

What do we have in row 1? Data that you want to average?

What does row 2 contain?

What does row 3 contain?
 
Upvote 0
Yes, in row 1 is the data that I want to average by the criteria in row 2 with the result in row 3. Sorry if its hard to follow.
 
Upvote 0
Hi Eric, Yeah the Averageifs formula doesn't work and just gives me a #DIV/0! if I try any more than one criteria. I think averageifs works on a AND condition and I think I need it to do an OR to achieve what I'm after. Thanks for looking though.
 
Upvote 0
My test sheet matches your output exactly:

ABCDEFGHIJ
110202520405030405010
21112223334
318.3333333318.333318.333336.666736.666736.666740404010

<tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
A3=AVERAGEIFS($A$1:$AV$1,$A$2:$AV$2,A2)

<tbody>
</tbody>

<tbody>
</tbody>




How are your requirements different? If you were to copy the formula to K3, you'd get a #DIV/0 error because there are no matching values. AVERAGEIFS can have more than one condition, but they are AND conditions as you surmise. But there are other ways to handle OR conditions. But please explain how your requirements differ from your example.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,621
Messages
6,125,884
Members
449,269
Latest member
GBCOACW

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