Formula to Group Duplicate Cells/Data into Single Cell (Not VBA)

HeyItsDizzy

New Member
Joined
Apr 11, 2018
Messages
20
Hey Guys Just after some heap been rcking my brain for days!

My Table/Range has been pupulated this way;
Window Support Channel
1/1800, 1/1200, 3/600,
Window Support Channel
4/1800, 2/1200, 4/900,
Window Support Channel
1/1800, 1/1200, 3/600,

<tbody>
</tbody>

<tbody>
</tbody>

I am trying to create another table, where I can read this Range and pupulate it this way;
Window Support Channel1/1800, 1/1200, 3/600, 4/1800, 2/1200, 4/900, 1/1800, 1/1200, 3/600,

<tbody>
</tbody>

And since I made that, I have also noticed noticed Duplicates, therfore is it also possible to take it further and make my table read this way;
Window Support Channel6/1800, 4/1200, 6/600, 4/900

<tbody>
</tbody>

Note: the "1800,1200,900,600" can be any length I have just used these sizes as reference


Thanks in Advance
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Your thread title says not vba. My assessment is that the problem is not feasible without vba.
 
Upvote 0
is that what you want?

ItemValueItemValue
Window Support Channel1/1800, 1/1200, 3/600,Window Support Channel1/1800, 1/1200, 3/600,4/1800, 2/1200, 4/900,
Window Support Channel4/1800, 2/1200, 4/900,
Window Support Channel1/1800, 1/1200, 3/600,
 
Upvote 0
so you can do that with Power Query aka Get&Transform and M-code (this is NOT vba):

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Group = Table.Group(Source, {"Item"}, {{"Count", each _, type table}}),
    List = Table.AddColumn(Group, "Value", each List.Distinct(Table.Column([Count],"Value"))),
    Extract = Table.TransformColumns(List, {"Value", each Text.Combine(List.Transform(_, Text.From)), type text})
in
    Extract[/SIZE]
 
Last edited:
Upvote 0
or more flexible

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Split = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Value", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Value"),
    Filter = Table.SelectRows(Split, each ([Value] <> "")),
    Group = Table.Group(Filter, {"Item"}, {{"Count", each _, type table}}),
    List = Table.AddColumn(Group, "Value", each List.Distinct(Table.Column([Count],"Value"))),
    Extract = Table.TransformColumns(List, {"Value", each Text.Combine(List.Transform(_, Text.From), ", "), type text})
in
    Extract[/SIZE]
 
Upvote 0
My assessment is that the problem is not feasible without vba.
What I should have said is "My assessment is that the problem is not feasible with formula as requested in thread title" :)
 
Last edited:
Upvote 0
Thanks all, for all of your feedback, perhaps VBA would be the best solution. My main issue was that;
Since this will become a template for all reports, I need the table to clean itself up automatically when our 3rd party program writes it into excel in this way. Therefore I was hoping to have a 'find and fix' option without the need of any manual action.
However, I believe I can be somewhat flexible, and use a 1 button function to run a VBA/Power Editor Code... I'm not sure what power editor is, However, I am pretty well diversed in the basics of VBA,

Could any of you be so kind and offer a VBA suggestion?

Thanks and Kind Regards, Dizzy
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,175
Members
448,870
Latest member
max_pedreira

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