Sumifs?? Left?? Dish sales

IvanYerk

Board Regular
Joined
Aug 26, 2018
Messages
61
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I'd like to sum all of the dish sales based on the Location number and Product IDs. Can I do this without creating a helper column?

ABCD
1LocationProduct IDProduct DescSales
2555652 Houston10047108Dish 12"4
3555652 Houston10047109Dish 16"11
4555652 Houston10047110Dish 18"11
5555652 Houston10047128Bowl 6"3
6555652 Houston10047129Bowl 8"12
7555652 Houston10047130Bowl 10"12
8555884 phoenix10047108Dish 12"8
9555884 phoenix10047109Dish 16"25
10555884 phoenix10047110Dish 18"25
11555884 phoenix10047128Bowl 6"8
12555884 phoenix10047129Bowl 8"25
13555884 phoenix10047130Bowl 10"25
14555102 chicago10047109Dish 16"6
15555102 chicago10047110Dish 18"6
16555102 chicago10047129Bowl 8"6
17555102 chicago10047130Bowl 10"6

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

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You mean like this?

LocationSumSales
555652 Houston
53​
555884 phoenix
116​
555102 chicago
24​
 
Upvote 0
More like this - just need dish products only and I can only search on Location ID even though the location id and name are in the same cell.

[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Location[/COLOR][COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]SumSales[/COLOR]
555652
26​
555884
58​
555102
12​

<tbody>
</tbody>
 
Upvote 0
Except I only need to sum Dish sales, not Bowls. But yes, this is generally what I need
 
Upvote 0
How about


Book1
ABCDEFG
1LocationProduct IDProduct DescSales
2555652 Houston10047108Dish 12"455565226
3555652 Houston10047109Dish 16"1155588458
4555652 Houston10047110Dish 18"1155510212
5555652 Houston10047128Bowl 6"3
6555652 Houston10047129Bowl 8"12
7555652 Houston10047130Bowl 10"12
8555884 phoenix10047108Dish 12"8
9555884 phoenix10047109Dish 16"25
10555884 phoenix10047110Dish 18"25
11555884 phoenix10047128Bowl 6"8
12555884 phoenix10047129Bowl 8"25
13555884 phoenix10047130Bowl 10"25
14555102 chicago10047109Dish 16"6
15555102 chicago10047110Dish 18"6
16555102 chicago10047129Bowl 8"6
17555102 chicago10047130Bowl 10"6
Sheet1
Cell Formulas
RangeFormula
G2=SUMPRODUCT((LEFT($A$2:$A$17,6)*1=F2)*(LEFT($C$2:$C$17,4)="Dish")*($D$2:$D$17))
 
Upvote 0
sure, so with Power Query

Location.1SumDish
555652
26​
555884
58​
555102
12​

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Split = Table.SplitColumn(Source, "Location", Splitter.SplitTextByDelimiter(" ", QuoteStyle.Csv), {"Location.1", "Location.2"}),
    Type = Table.TransformColumnTypes(Split,{{"Product Desc", type text}}),
    IF = Table.AddColumn(Type, "Custom", each if Text.Contains([Product Desc], "Dish") then 1 else null),
    Filter = Table.SelectRows(IF, each ([Custom] = 1)),
    Group = Table.Group(Filter, {"Location.1"}, {{"SumDish", each List.Sum([Sales]), type number}})
in
    Group[/SIZE]
 
Upvote 0
Hi, here is another option you could try.


Excel 2013/2016
ABCDEFG
1LocationProduct IDProduct DescSales
2555652 Houston10047108Dish 12"455565226
3555652 Houston10047109Dish 16"1155588458
4555652 Houston10047110Dish 18"1155510212
5555652 Houston10047128Bowl 6"3
6555652 Houston10047129Bowl 8"12
7555652 Houston10047130Bowl 10"12
8555884 phoenix10047108Dish 12"8
9555884 phoenix10047109Dish 16"25
10555884 phoenix10047110Dish 18"25
11555884 phoenix10047128Bowl 6"8
12555884 phoenix10047129Bowl 8"25
13555884 phoenix10047130Bowl 10"25
14555102 chicago10047109Dish 16"6
15555102 chicago10047110Dish 18"6
16555102 chicago10047129Bowl 8"6
17555102 chicago10047130Bowl 10"6
Sheet1
Cell Formulas
RangeFormula
G2=SUMIFS(D:D,A:A,F2&"*",C:C,"Dish*")
 
Upvote 0
It never ceases to amaze me how wonderful a place like this can be - thank you so much for your help!! Worked perfectly.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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