Grouping unique ID's by Account Name

Elliottj2121

Board Regular
Joined
Apr 15, 2021
Messages
56
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hello I am not sure how to group the request IDs by the customer name on the same row. In the example below Alpha has two unique Request IDs. I am looking to group them by customer name, then A/C number, and each request ID into columns on the same row. See second example. Some A/C numbers have leading zeros some dont. I am trying to maintain that integrity also. Thank you!!!

How the data currently is:

Book1
ABC
1CUSTOMER A/C NUMREQUEST ID
2Alpha401115A
3Alpha401115B
4Beta5225888A
5Beta5225888B
6Beta5225888D
7Beta5225A77787
8Delta4033YT8888
9Delta4033TY58
10Gamma95549999AQ
11Gamma95548675309A
12Gamma95543.1415PI
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1Cell ValueduplicatestextNO
A1Cell ValueduplicatestextNO


What I am looking for:

Book1
ABCDEF
15CUSTOMER A/C NUMREQUEST ID 1REQUEST ID 2REQUEST ID 3REQUEST ID 4
16Alpha401115A15B
17Beta5225888A888B888DA77787
18Delta4033YT8888TY58
19Gamma95549999AQ8675309A3.1415PI
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B15Cell ValueduplicatestextNO
A15Cell ValueduplicatestextNO
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about this?

PQ
ABCDEFGHIJ
1CUSTOMERA/C NUMREQUEST IDCUSTOMERA/C NUMREQUEST ID 1REQUEST ID 2REQUEST ID 3REQUEST ID 4
2Alpha401115AAlpha401115A15B
3Alpha401115BBeta5225888A888B888DA77787
4Beta5225888ADelta4033YT8888TY58
5Beta5225888BGamma95549999AQ8675309A3.1415PI
6Beta5225888D
7Beta5225A77787
8Delta4033YT8888
9Delta4033TY58
10Gamma95549999AQ
11Gamma95548675309A
12Gamma95543.1415PI
Sheet3


Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table11"]}[Content],
    Group = Table.Group(Source, {"CUSTOMER", "A/C NUM"}, {{"Count", each _, type table [CUSTOMER=text, #"A/C NUM"=number, REQUEST ID=text]}}),
    Extract = Table.TransformColumns(Group,{{"Count", each Text.Combine(Table.Column(_,"REQUEST ID"),"~")}}),
    Split = Table.SplitColumn(Extract, "Count", Splitter.SplitTextByDelimiter("~", QuoteStyle.Csv), List.Transform({"1"..Text.From(List.Count(Group[CUSTOMER]))}, each "REQUEST ID " & _))
in
    Split
 
Last edited:
Upvote 0
Another option
Fluff.xlsm
ABCDEFGHIJ
1CUSTOMER A/C NUMREQUEST ID
2Alpha401115AAlpha401115A15B
3Alpha401115BBeta0225888A888B888DA77787
4Beta0225888ADelta4033YT8888TY58
5Beta0225888BGamma95549999AQ8675309A3.1415PI
6Beta0225888D
7Beta0225A77787
8Delta4033YT8888
9Delta4033TY58
10Gamma95549999AQ
11Gamma95548675309A
12Gamma95543.1415PI
13
Master
Cell Formulas
RangeFormula
E2:F5E2=UNIQUE(FILTER(A2:B100,A2:A100<>""))
G2:H2,G5:I5,G4:H4,G3:J3G2=TOROW(FILTER($C$2:$C$100,$A$2:$A$100=E2))
Dynamic array formulas.
 
Upvote 0
Solution
Another option
Fluff.xlsm
ABCDEFGHIJ
1CUSTOMER A/C NUMREQUEST ID
2Alpha401115AAlpha401115A15B
3Alpha401115BBeta0225888A888B888DA77787
4Beta0225888ADelta4033YT8888TY58
5Beta0225888BGamma95549999AQ8675309A3.1415PI
6Beta0225888D
7Beta0225A77787
8Delta4033YT8888
9Delta4033TY58
10Gamma95549999AQ
11Gamma95548675309A
12Gamma95543.1415PI
13
Master
Cell Formulas
RangeFormula
E2:F5E2=UNIQUE(FILTER(A2:B100,A2:A100<>""))
G2:H2,G5:I5,G4:H4,G3:J3G2=TOROW(FILTER($C$2:$C$100,$A$2:$A$100=E2))
Dynamic array formulas.

This worked perfectly!
 
Upvote 0
How about this?

PQ
ABCDEFGHIJ
1CUSTOMERA/C NUMREQUEST IDCUSTOMERA/C NUMREQUEST ID 1REQUEST ID 2REQUEST ID 3REQUEST ID 4
2Alpha401115AAlpha401115A15B
3Alpha401115BBeta5225888A888B888DA77787
4Beta5225888ADelta4033YT8888TY58
5Beta5225888BGamma95549999AQ8675309A3.1415PI
6Beta5225888D
7Beta5225A77787
8Delta4033YT8888
9Delta4033TY58
10Gamma95549999AQ
11Gamma95548675309A
12Gamma95543.1415PI
Sheet3


Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table11"]}[Content],
    Group = Table.Group(Source, {"CUSTOMER", "A/C NUM"}, {{"Count", each _, type table [CUSTOMER=text, #"A/C NUM"=number, REQUEST ID=text]}}),
    Extract = Table.TransformColumns(Group,{{"Count", each Text.Combine(Table.Column(_,"REQUEST ID"),"~")}}),
    Split = Table.SplitColumn(Extract, "Count", Splitter.SplitTextByDelimiter("~", QuoteStyle.Csv), List.Transform({"1"..Text.From(List.Count(Group[CUSTOMER]))}, each "REQUEST ID " & _))
in
    Split

Im not proficient enough power query. Would love to learn more.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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