Data consolidation with permanent cell and IF statement

dmelnik

New Member
Joined
Apr 27, 2020
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hello,
im having trouble with coming up with a formula for the following case:
We have sheet with data about different products:
ProductQuantityLocation
Product 151-1-1
Product 1101-1-1
Product 151-1-2
Product 2101-1-2
Product 351-1-2
Product 3101-1-3

Our goal is to consolidate the table by Product with suming up the quantities, but keeping the Location information similar to 1-1-1 / 1-1-1 / 1-1-2. So after the require manipulations the table should look like this:
ProductQuantityLocation
Product 1201-1-1 / 1-1-1 / 1-1-2
Product 2101-1-2
Product 3151-1-2 / 1-1-3
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
you can try with Power Query aka Get&Transform
grp.png

Rich (BB code):
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Type = Table.TransformColumnTypes(Source,{{"Product", type text}, {"Quantity", Int64.Type}, {"Location", type text}}),
    Group = Table.Group(Type, {"Product"}, {{"Quantity", each List.Sum([Quantity]), type number}, {"Count", each _, type table}}),
    List = Table.AddColumn(Group, "Location", each [Count][Location]),
    Extract = Table.TransformColumns(List, {"Location", each Text.Combine(List.Transform(_, Text.From), "/"), type text})
in
    Extract
-------------------
more about PowerQuery aka Get&Transform
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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