Replace Pivot table with sumifs

Bulloff

New Member
Joined
Jul 2, 2016
Messages
13
Hello community,

Is there a way to replicate the results of a pivot table with sumifs for example. The issue is that the particular pivot table has some items filtered in report filter and I do not know how to handle this in a formula.

I have a report with say 30 columns and 20 000 rows. The columns I am interested are :
A- Region
B- Sales
C- Product
Other columns are not important for the sake of this question.
In a pivot table I can put a filter on product for specific products and then get total sales per region and specific products.
How can I do this with formulas? How can I exlcude specific products in the formula with sumifs?

Thanks for any hints
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Can you provide some sample data and what the expected outcome is?

Yes,
Below is the result with a pivot table: I have filtered all products without A in the pivot table. How can I get the same result with a formula, not using a Pivot table? Without this additional filter set on Product I can do it with SUMIF, but do not know how to exclude Product A and use SUMIF together.
Product (Multiple Items)
RegionProduct Sales
East A10Row LabelsSum of Sales
WestB20East 50
NorthC30North90
South D40South 110
East E50West20
NorthF60Grand Total270
South G70


Thanks.

<colgroup><col span="5"><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
A
B
C
D
E
F
1
RegionProductSales
2
EastA
10​
Row LabelsSum of Sales
3
WestB
20​
East
50​
4
NorthC
30​
North
90​
5
SouthD
40​
South
110​
6
EastE
50​
West
20​
7
NorthF
60​
Grand Total
270​
8
SouthG
70​

<tbody>
</tbody>

f3=SUMIFS($C$2:$C$8,$B$2:$B$8,"<>"&$B$2,$A$2:$A$8,$E3) copy down until west

f7=SUM(F3:F6)
 
Upvote 0
A
B
C
D
E
F
1
RegionProductSales
2
EastA
10​
Row LabelsSum of Sales
3
WestB
20​
East
50​
4
NorthC
30​
North
90​
5
SouthD
40​
South
110​
6
EastE
50​
West
20​
7
NorthF
60​
Grand Total
270​
8
SouthG
70​

<tbody>
</tbody>

f3=SUMIFS($C$2:$C$8,$B$2:$B$8,"<>"&$B$2,$A$2:$A$8,$E3) copy down until west

f7=SUM(F3:F6)

This does work with this particular data set but only because product A happens to be in B2.

Assuming the same layout as marz, this would account for the aforementioned drawback.

f3=SUMIFS(C:C,A:A,"="&E3,B:B,"<>a")
 
Upvote 0
A
B
C
D
E
F
1
RegionProductSales
2
EastA
10​
Row LabelsSum of Sales
3
WestB
20​
East
50​
4
NorthC
30​
North
90​
5
SouthD
40​
South
110​
6
EastE
50​
West
20​
7
NorthF
60​
Grand Total
270​
8
SouthG
70​

<tbody>
</tbody>

f3=SUMIFS($C$2:$C$8,$B$2:$B$8,"<>"&$B$2,$A$2:$A$8,$E3) copy down until west

f7=SUM(F3:F6)

Hi , thanks for replying. However I am unable to get it right for some reason:

SUMIFS($C$3:$C$9,$B$3:$B$9,B3,$C$3:C10,"<>A") - this returns #Value error.

Where am I doing it wrong, the first condition is easy, but I do not know how to exclude the "A" product, not being a specific cell but a text that will be repeated many times over a long list.
I think I do not know how to formulate "excluding" and that`s why the error comes.

Thanks.
 
Upvote 0
Because I had a different formula in there first and forgot to take it out when I amended it. It does not need to be there.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

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