Need help with data consolidation

iamhere_18

New Member
Joined
Dec 4, 2018
Messages
4
Hi All!

I could use some help with this, if anyone has any ideas on how to tackle it I'd be really grateful. Here's an example of what I'm working with:

IDLocationContact
1123 Main St
1Jane Doe
1Jack Frost
2456 Second St
2
2Lacie Lou
2John Doe
3789 Third St
3

<tbody>
</tbody>


My files have hundreds of rows and atleast 20 columns so this is a much smaller example obviously.. How can I condense something like this without corrupting the data? Is it something that can only be done manually?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
You didn't show what you want to achieve but maybe...

with your example & PowerQuery:

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filled Down" = Table.FillDown(Source,{"Location"}),
    #"Grouped Rows" = Table.Group(#"Filled Down", {"ID", "Location"}, {{"Count", each _, type table}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Contact", each List.Distinct(Table.Column([Count],"Contact"))),
    #"Extracted Values" = Table.TransformColumns(#"Added Custom", {"Contact", each Text.Combine(List.Transform(_, Text.From), ", "), type text})
in
    #"Extracted Values"[/SIZE]

IDLocationContactIDLocationContact
1​
123 Main St
1​
123 Main StJane Doe, Jack Frost
1​
Jane Doe
2​
456 Second StLacie Lou, John Doe
1​
Jack Frost
3​
789 Third St
2​
456 Second St
2​
2​
Lacie Lou
2​
John Doe
3​
789 Third St
3​
 
Last edited:
Upvote 0
Thanks for your response! Here is an example of what I need achieved:

Some of the rows need a blank contact cell, they might have info in a different column (ie: accountspayable@somebusiness.com in the email column not pictured in this example)

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
IdLocationContact
1123 Main St
1123 Main StJane Doe
1123 Main StJack Frost
2456 Second StLacie Lou
2456 Second StJohn Doe
3789 Third St

<colgroup><col style="width: 100px"><col width="100"><col width="100"></colgroup><tbody>
</tbody>
 
Upvote 0
something like this?

IDLocationContact
1​
123 Main St
1​
123 Main StJane Doe
1​
123 Main StJack Frost
2​
456 Second St
2​
456 Second StLacie Lou
2​
456 Second StJohn Doe
3​
789 Third St
 
Upvote 0
sure

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filled Down" = Table.FillDown(Source,{"Location"}),
    #"Grouped Rows" = Table.Group(#"Filled Down", {"ID", "Location"}, {{"Count", each _, type table}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Contact", each List.Distinct(Table.Column([Count],"Contact"))),
    #"Expanded Contact" = Table.ExpandListColumn(#"Added Custom", "Contact")
in
    #"Expanded Contact"[/SIZE]
 
Upvote 0

Forum statistics

Threads
1,216,225
Messages
6,129,601
Members
449,520
Latest member
TBFrieds

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