SUBTOTAL (average) on criteria

colaps

New Member
Joined
Jan 29, 2013
Messages
37
Hello,

I have an issue and i need your assistance
Situation is like this:


Zone
StoreID

<tbody>
</tbody>
Sortiments

<tbody>
</tbody>
SoldQty(Kg)

<tbody>
</tbody>
EU
SHOP1

<tbody>
</tbody>
APPLE200
EU
SHOP1

<tbody>
</tbody>
ORANGE140
EU
SHOP1

<tbody>
</tbody>
ONION

<tbody>
</tbody>
21
EU
SHOP1

<tbody>
</tbody>
POTATO

<tbody>
</tbody>
47
EU
SHOP1

<tbody>
</tbody>
GRAPES

<tbody>
</tbody>
EU
SHOP1

<tbody>
</tbody>
LEMON

<tbody>
</tbody>
589
EUSHOP1
EGG

<tbody>
</tbody>
EUSHOP3APPLE34
EUSHOP3ORANGE
EUSHOP3
ONION

<tbody>
</tbody>
450
EUSHOP3POTATO
EUSHOP3GRAPES243
EUSHOP3LEMONn/a
EUSHOP3EGG
USSHOP2APPLE230
USSHOP2ORANGE144
USSHOP2
ONION

<tbody>
</tbody>
200
USSHOP2
POTATO

<tbody>
</tbody>
85
USSHOP2
GRAPES

<tbody>
</tbody>
USSHOP2
LEMON

<tbody>
</tbody>
254
USSHOP2
EGG

<tbody>
</tbody>
n/a

<tbody>
</tbody>



i need to have the average on the values from column " SoldQty(Kg) " in the table below.
Filter criteria is on Zone ( EU and US , and on sortiment type )

The result should look like:

ZoneSortimentAverage
EUAPPLE
ORANGE
ONION
POTATO
GRAPES
LEMON
EGG

<tbody>
</tbody>
USAPPLE
ORANGE
ONION
POTATO
GRAPES
LEMON
EGG

<tbody>
</tbody>


average value for each of the sortiment ( APPLE, ONION , etc ) but for the corresponding Zone.


My idea was to use SUBTOTAL(101,range) to get the AVERAGE values even if the values are blank or text, and at the same time i need to make sure that i can have the criteria for the zone , i`m stuck at this now.

Any help is welcomed.

Thank you.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Hi Colaps, You can create a Pivot Table as shown:

da6a31b9e08dce1816ce90664c1a0784.jpg
 
Upvote 0
If you get rid of the merged cells in results table, then: =IFERROR(AVERAGEIFS(D:D,A:A,LOOKUP(2,1/($L$3:L3<>""),$L$3:L3),C:C,M3),"")
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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