Summarizing Data in Excel

jjohn0085

New Member
Joined
Jul 8, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I'm managing a restaurant and from my POS system i can pull out daily sales report, using the same data i want to estimate my Raw Materials Expenses. And to do so I need help with appropriate formula which can give me a summary of "Sub Category" under "column C" and "Category" under "Column B" on a separate worksheet.
Example: I want to know total count of items sold under Sub Category consisting of "Chicken", "Beef" etc to estimate my Raw Material Expenses
I want to know total count of items sold under Category falling under "Desi Chinese", "North Indian" etc

1594240681674.png
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Cannot manipulate data in a picture. Please use XL2BB to upload data. See the link in my signature.
 
Upvote 0
You can do it using Pivot Table.
Please post the data using xl2bb as we have to type the whole thing
 
Upvote 0
ProductCategorySub CategoryQtyPriceTotal Price
Karak TeaCafeteriaRainbow Milk164
QAR 1.00​
QAR 164.00​
Karak Tea LargeCafeteriaRainbow Milk31
QAR 2.00​
QAR 62.00​
CoffeeCafeteriaRainbow Milk6
QAR 2.00​
QAR 12.00​
Coffee MediumCafeteriaRainbow Milk6
QAR 3.00​
QAR 18.00​
Water SmallCoolerCooler18
QAR 1.00​
QAR 18.00​
Water BigCoolerCooler9
QAR 2.00​
QAR 18.00​
PepsiCoolerCooler1
QAR 3.00​
QAR 3.00​
7upCoolerCooler2
QAR 3.00​
QAR 6.00​
Mountain DewCoolerCooler2
QAR 3.00​
QAR 6.00​
Chicken Steam Momo - LDesi ChineseChicken1
QAR 11.00​
QAR 11.00​
Chicken Fry Momo -SDesi ChineseChicken2
QAR 7.00​
QAR 14.00​
Malabar ParottaSouth IndianMaida268
QAR 1.00​
QAR 268.00​
Wheat ParottaSouth IndianChakki Atta18
QAR 2.00​
QAR 36.00​
Aalu ParathaNorth IndianChakki Atta4
QAR 5.00​
QAR 20.00​
ChappathiSouth IndianChappathi44
QAR 1.00​
QAR 44.00​
Dosa SetBreakfastDosa Batter5
QAR 5.00​
QAR 25.00​
Thattu DosaBreakfastDosa Batter6
QAR 5.00​
QAR 30.00​
Masala DosaBreakfastDosa Batter10
QAR 6.00​
QAR 60.00​
Ghee RoastBreakfastDosa Batter2
QAR 6.00​
QAR 12.00​
Appam/ DosaBreakfastDosa Batter6
QAR 1.00​
QAR 6.00​
Idly SetBreakfastDosa Batter8
QAR 6.00​
QAR 48.00​
Poori MasalaBreakfastChakki Atta6
QAR 6.00​
QAR 36.00​
Kadala/ CheruppayarBreakfastBrown Chana11
QAR 4.00​
QAR 44.00​
Green Peas MasalaSouth IndianGreen Peas Frozen1
QAR 10.00​
QAR 10.00​
Egg RoastBreakfastEgg5
QAR 5.00​
QAR 25.00​
Aloo BhajiBreakfastVegetable4
QAR 4.00​
QAR 16.00​
Dal FryNorth IndianVegetable2
QAR 7.00​
QAR 14.00​
Beef CurrySouth IndianBeef1
QAR 12.00​
QAR 12.00​
Egg Single OmeletteBreakfastEgg3
QAR 2.00​
QAR 6.00​
Egg Double OmeletteBreakfastEgg1
QAR 3.00​
QAR 3.00​
LemonCafeteriaFruits2
QAR 3.00​
QAR 6.00​
Lemon MintCafeteriaFruits1
QAR 4.00​
QAR 4.00​
Orange JuiceCafeteriaFruits1
QAR 4.00​
QAR 4.00​
AvacadoCafeteriaFruits6
QAR 7.00​
QAR 42.00​
MangoCafeteriaFruits1
QAR 10.00​
QAR 10.00​
Orange FreshCafeteriaFruits4
QAR 8.00​
QAR 32.00​
Mix ****tailCafeteriaFruits2
QAR 8.00​
QAR 16.00​
ChocolateCafeteriaChocolate1
QAR 10.00​
QAR 10.00​
Fruit SaladCafeteriaFruits1
QAR 10.00​
QAR 10.00​
Oasis Fruit SaladCafeteriaFruits1
QAR 12.00​
QAR 12.00​
Samona Cheese SandwichCafeteriaCheese1
QAR 2.00​
QAR 2.00​
Parotta Egg SandwichCafeteriaEgg23
QAR 4.00​
QAR 92.00​
Parotta Chicken SandwichCafeteriaChicken7
QAR 5.00​
QAR 35.00​
Oasis SpecialCafeteriaChicken1
QAR 8.00​
QAR 8.00​
Chicken BurgerCafeteriaChicken Burger9
QAR 5.00​
QAR 45.00​
Chicken FilletCafeteriaChicken1
QAR 7.00​
QAR 7.00​
Veg BurgerCafeteriaVegetable Burger2
QAR 6.00​
QAR 12.00​
Club NormalCafeteriaChicken2
QAR 10.00​
QAR 20.00​
Meals Parcel - BarikLunchLunch10
QAR 9.00​
QAR 90.00​
 
Upvote 0
Is this you want

Book1
ABCDEFGHIJK
2ProductCategorySub CategoryQtyPriceTotal PriceCategorySub CategorySum of Qty
3Karak TeaCafeteriaRainbow Milk164QAR 1.00QAR 164.00BreakfastBrown Chana11
4Karak Tea LargeCafeteriaRainbow Milk31QAR 2.00QAR 62.00Chakki Atta6
5CoffeeCafeteriaRainbow Milk6QAR 2.00QAR 12.00Dosa Batter37
6Coffee MediumCafeteriaRainbow Milk6QAR 3.00QAR 18.00Egg9
7Water SmallCoolerCooler18QAR 1.00QAR 18.00Vegetable4
8Water BigCoolerCooler9QAR 2.00QAR 18.00CafeteriaCheese1
9PepsiCoolerCooler1QAR 3.00QAR 3.00Chicken11
107upCoolerCooler2QAR 3.00QAR 6.00Chicken Burger9
11Mountain DewCoolerCooler2QAR 3.00QAR 6.00Chocolate1
12Chicken Steam Momo - LDesi ChineseChicken1QAR 11.00QAR 11.00Egg23
13Chicken Fry Momo -SDesi ChineseChicken2QAR 7.00QAR 14.00Fruits19
14Malabar ParottaSouth IndianMaida268QAR 1.00QAR 268.00Rainbow Milk207
15Wheat ParottaSouth IndianChakki Atta18QAR 2.00QAR 36.00Vegetable Burger2
16Aalu ParathaNorth IndianChakki Atta4QAR 5.00QAR 20.00CoolerCooler32
17ChappathiSouth IndianChappathi44QAR 1.00QAR 44.00Desi ChineseChicken3
18Dosa SetBreakfastDosa Batter5QAR 5.00QAR 25.00LunchLunch10
19Thattu DosaBreakfastDosa Batter6QAR 5.00QAR 30.00North IndianChakki Atta4
20Masala DosaBreakfastDosa Batter10QAR 6.00QAR 60.00Vegetable2
21Ghee RoastBreakfastDosa Batter2QAR 6.00QAR 12.00South IndianBeef1
22Appam/ DosaBreakfastDosa Batter6QAR 1.00QAR 6.00Chakki Atta18
23Idly SetBreakfastDosa Batter8QAR 6.00QAR 48.00Chappathi44
24Poori MasalaBreakfastChakki Atta6QAR 6.00QAR 36.00Green Peas Frozen1
25Kadala/ CheruppayarBreakfastBrown Chana11QAR 4.00QAR 44.00Maida268
26Green Peas MasalaSouth IndianGreen Peas Frozen1QAR 10.00QAR 10.00Grand Total723
27Egg RoastBreakfastEgg5QAR 5.00QAR 25.00
28Aloo BhajiBreakfastVegetable4QAR 4.00QAR 16.00
29Dal FryNorth IndianVegetable2QAR 7.00QAR 14.00
30Beef CurrySouth IndianBeef1QAR 12.00QAR 12.00
31Egg Single OmeletteBreakfastEgg3QAR 2.00QAR 6.00
32Egg Double OmeletteBreakfastEgg1QAR 3.00QAR 3.00
33LemonCafeteriaFruits2QAR 3.00QAR 6.00
34Lemon MintCafeteriaFruits1QAR 4.00QAR 4.00
35Orange JuiceCafeteriaFruits1QAR 4.00QAR 4.00
36AvacadoCafeteriaFruits6QAR 7.00QAR 42.00
37MangoCafeteriaFruits1QAR 10.00QAR 10.00
38Orange FreshCafeteriaFruits4QAR 8.00QAR 32.00
39Mix ****tailCafeteriaFruits2QAR 8.00QAR 16.00
40ChocolateCafeteriaChocolate1QAR 10.00QAR 10.00
41Fruit SaladCafeteriaFruits1QAR 10.00QAR 10.00
42Oasis Fruit SaladCafeteriaFruits1QAR 12.00QAR 12.00
43Samona Cheese SandwichCafeteriaCheese1QAR 2.00QAR 2.00
44Parotta Egg SandwichCafeteriaEgg23QAR 4.00QAR 92.00
45Parotta Chicken SandwichCafeteriaChicken7QAR 5.00QAR 35.00
46Oasis SpecialCafeteriaChicken1QAR 8.00QAR 8.00
47Chicken BurgerCafeteriaChicken Burger9QAR 5.00QAR 45.00
48Chicken FilletCafeteriaChicken1QAR 7.00QAR 7.00
49Veg BurgerCafeteriaVegetable Burger2QAR 6.00QAR 12.00
50Club NormalCafeteriaChicken2QAR 10.00QAR 20.00
51Meals Parcel - BarikLunchLunch10QAR 9.00QAR 90.00
Sheet7
 
Upvote 0
Using Power Query/Get and Transform, I grouped the data by Category and Sub-Category. Mcode as follows

Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Product", type text}, {"Category", type text}, {"Sub Category", type text}, {"Qty", Int64.Type}, {"Price", type text}, {"Total Price", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Category", "Sub Category"}, {{"Quantity", each List.Sum([Qty]), type number}}),
    #"Sorted Rows" = Table.Sort(#"Grouped Rows",{{"Category", Order.Ascending}, {"Sub Category", Order.Ascending}})
in
    #"Sorted Rows"

Book4
ABC
1CategorySub CategoryQuantity
2BreakfastBrown Chana11
3BreakfastChakki Atta6
4BreakfastDosa Batter37
5BreakfastEgg9
6BreakfastVegetable4
7CafeteriaCheese1
8CafeteriaChicken11
9CafeteriaChicken Burger9
10CafeteriaChocolate1
11CafeteriaEgg23
12CafeteriaFruits19
13CafeteriaRainbow Milk207
14CafeteriaVegetable Burger2
15CoolerCooler32
16Desi ChineseChicken3
17LunchLunch10
18North IndianChakki Atta4
19North IndianVegetable2
20South IndianBeef1
21South IndianChakki Atta18
22South IndianChappathi44
23South IndianGreen Peas Frozen1
24South IndianMaida268
Sheet2
 
Upvote 0

Forum statistics

Threads
1,214,959
Messages
6,122,476
Members
449,087
Latest member
RExcelSearch

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