Neeed Formula to get averges based on multiple conditions (Similar like Pivot summary)

harinsh

Active Member
Joined
Feb 7, 2012
Messages
273
Hi Team,

I'm looking one typical formula to get the required information this can be done by using Pivot Table but looking in formula how can we integrate this requirement.

Please look into below table and also out put table and I need to get the average of P1, P2 & P3 based on model & location.

S.L NO
Model
Loc
Dept
P1
P2
P3
11111
AB123
A
General Dept177494006599
11113 AB123
AGeneral Dept255445705444
11115
AB321
BGeneral Dept14555177214
11117 AB321
BGeneral Dept244614472144
11119 AC123
CGeneral Dept6152582102
11121 AC123
CGeneral Dept7221257365
11123 AC321
EGeneral Dept9824790254
11125 AC321
EGeneral Dept5409470477
11127 AD123
DGeneral Dept1712722452
11129 AD123
DGeneral Dept97017122167
11131 AD321
FGeneral Dept04572497
11133 AD321
FGeneral Dept78414417256
11135 AD321
HGeneral Dept1547451247
11137
AF123
HGeneral Dept65425
5

<colgroup><col span="3"><col><col span="3"></colgroup><tbody>
</tbody>

Required output (this was done by using Pivot table)

Row Labels
Average of P1Average of P2Average of P3
A
2,164 6,985 6,022
B
1,951 3,312 1,179
C
669 758 1,234
D
1,341 1,217 1,310
E 761 7,130 366
F 3,921 2,437 1,377
H 1,101 238 126
Grand Total 1,701 3,154 1,659

<colgroup><col><col span="3"></colgroup><tbody>
</tbody>

Please help with formula and this would help me lot in order to include in macro.

Thanks,
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Thanks for your reply.....I'm using Excel 2007 but I tried that function not able to get the output.

Please help me out with this formula.

Thanks,
 
Upvote 0
With your first table in the range A1:G15 and your second table in the range I1:L8, in J2 copied down and across:

=AVERAGEIF($C$2:$C$15,$I2,E$2:E$15)
 
Upvote 0
sorry, let me put in different way...actually I did not update the right output in the above.

By using avergeif function I will get it but need to customize little more I would like average based on multiple location (user define location) because I have various locations whereas I need to show it by combining the two or more location averages with help of model of the product like below table.

Row LabelsTotal Average of P1 - A&B LocationTotal Average of P2 A&B LocationTotal Average of P3 A&B Location
AB123 2,164.00 6,985.00 6,021.50
AB321 1,950.50 3,312.00 1,179.00
Grand Total 2,057.25 5,148.50 3,600.25

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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