Averageif w/ multiple criteria - trying to grab the right row

patrickjpatten

New Member
Joined
Jan 31, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I'm just having a real difficulty doing this and I can't figure it out. I'm sorry. I just don't know what formula to put in there to grab the right average. I have the months across the top i just don't know to create a dynamic averageif function inside the [average_range] criteria.... basically i know i can hard code inside those "?" but i'd like it to be more dynamic, like i can stick Pears, apples, or bananas in and it'd work
as
1​
1​
1​
2​
2​
2​
3​
3​
3​
1/1/2023​
1/2/2023​
1/3/2023​
2/1/2023​
2/2/2023​
2/3/2023​
3/1/2023​
3/2/2023​
3/3/2023​
Pears
1.25​
1.5​
1.35​
1.42​
1.68​
2.05​
2.25​
2.5​
2.35​
Apples
3.15​
3.14​
3.16​
3.08​
3.02​
3.7​
4.2​
4.25​
4.05​
Bananas
2.5​
2.45​
1.55​
2.65​
2.75​
2.68​
2.42​
2.31​
2.56​
MonthAverage
1​
Pears?
1​
Apples?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about
Fluff.xlsm
ABCDEFGHIJ
1111222333
201/01/202302/01/202303/01/202301/02/202302/02/202303/02/202301/03/202302/03/202303/03/2023
3Pears1.251.51.351.421.682.052.252.52.35
4Apples3.153.143.163.083.023.74.24.254.05
5Bananas2.52.451.552.652.752.682.422.312.56
6
7MonthAverage
81Pears1.3666667
91Apples3.15
Main
Cell Formulas
RangeFormula
D8:D9D8=AVERAGE(FILTER(FILTER($B$3:$J$5,$A$3:$A$5=C8),$B$1:$J$1=B8))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

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