Transpose, Table, or Formulas

LearnVBA83

Board Regular
Joined
Dec 1, 2016
Messages
122
Office Version
  1. 365
Platform
  1. Windows
Hi team excel,

I have a large excel spreadsheet with GL Accounts and the ID of people that post to those accounts. I'm building like an account mapping legend and was wondering if there is an easy way to turn the data in columns A & B to the format of columns F - K ? Maybe using a table, pivot, or transpose?

Line Items (1).xlsx
ABCDEFGHIJK
1G/L AccountParked ByG/L AccountName 1Name 2Name 3Name4Name 5
21001002C3962301001002C396230C393743SYSTEMDSWHITE
31001002C3937431001004C754095SYSTEMC210747C027040C577891
41001002SYSTEM1001502C396230C393743SYSTEM
51001002DSWHITE1001503C396230SYSTEM
61001004C7540951001504C396230SYSTEM
71001004SYSTEM1001505C396230SYSTEM
81001004C2107471001507C396230C393743SYSTEM
91001004C0270401001508C396230SYSTEM
101001004C5778911001510DPETRUCCIC393743C396230C577891SYSTEM
111001502C396230
121001502C393743
131001502SYSTEM
141001503C396230
151001503SYSTEM
161001504C396230
171001504SYSTEM
181001505C396230
191001505SYSTEM
201001507C396230
211001507C393743
221001507SYSTEM
231001508C396230
241001508SYSTEM
251001510DPETRUCCI
261001510C393743
271001510C396230
281001510C577891
291001510SYSTEM
30
Sheet3
 
How about
Fluff.xlsm
ABCDEFGHIJK
1G/L AccountParked ByG/L AccountName 1Name 2Name 3Name4Name 5
21001002C3962301001002C396230C393743SYSTEMDSWHITE
31001002C3937431001004C754095SYSTEMC210747C027040C577891
41001002SYSTEM1001502C396230C393743SYSTEM
51001002DSWHITE1001503C396230SYSTEM
61001004C7540951001504C396230SYSTEM
71001004SYSTEM1001505C396230SYSTEM
81001004C2107471001507C396230C393743SYSTEM
91001004C0270401001508C396230SYSTEM
101001004C5778911001510DPETRUCCIC393743C396230C577891SYSTEM
111001502C396230
121001502C393743
131001502SYSTEM
141001503C396230
151001503SYSTEM
161001504C396230
171001504SYSTEM
181001505C396230
191001505SYSTEM
201001507C396230
211001507C393743
221001507SYSTEM
231001508C396230
241001508SYSTEM
251001510DPETRUCCI
261001510C393743
271001510C396230
281001510C577891
291001510SYSTEM
Data
Cell Formulas
RangeFormula
F2:K10F2=LET(g,DROP(GROUPBY(A2:A100,B2:B100,HSTACK(LAMBDA(v,"|"&TEXTJOIN("|",,v)),COUNTA),0,0,,A2:A100<>""),1),c,TAKE(g,,-1),m,MAX(c),HSTACK(TAKE(g,,1),TEXTBEFORE(TEXTAFTER(INDEX(g,,2)&REPT("|",m-c+1),"|",SEQUENCE(,m)),"|")))
Dynamic array formulas.
 
Upvote 0
As usual, Fluff's solution is a BEAUTY TO BEHOLD.

I think this also works:

F2: =UNIQUE(A2:.A100)
G2: =TRANSPOSE(FILTER($B$2:.$B$100,$A$2:.$A$100=F2)) filled down
 
Upvote 0
How about
Fluff.xlsm
ABCDEFGHIJK
1G/L AccountParked ByG/L AccountName 1Name 2Name 3Name4Name 5
21001002C3962301001002C396230C393743SYSTEMDSWHITE
31001002C3937431001004C754095SYSTEMC210747C027040C577891
41001002SYSTEM1001502C396230C393743SYSTEM
51001002DSWHITE1001503C396230SYSTEM
61001004C7540951001504C396230SYSTEM
71001004SYSTEM1001505C396230SYSTEM
81001004C2107471001507C396230C393743SYSTEM
91001004C0270401001508C396230SYSTEM
101001004C5778911001510DPETRUCCIC393743C396230C577891SYSTEM
111001502C396230
121001502C393743
131001502SYSTEM
141001503C396230
151001503SYSTEM
161001504C396230
171001504SYSTEM
181001505C396230
191001505SYSTEM
201001507C396230
211001507C393743
221001507SYSTEM
231001508C396230
241001508SYSTEM
251001510DPETRUCCI
261001510C393743
271001510C396230
281001510C577891
291001510SYSTEM
Data
Cell Formulas
RangeFormula
F2:K10F2=LET(g,DROP(GROUPBY(A2:A100,B2:B100,HSTACK(LAMBDA(v,"|"&TEXTJOIN("|",,v)),COUNTA),0,0,,A2:A100<>""),1),c,TAKE(g,,-1),m,MAX(c),HSTACK(TAKE(g,,1),TEXTBEFORE(TEXTAFTER(INDEX(g,,2)&REPT("|",m-c+1),"|",SEQUENCE(,m)),"|")))
Dynamic array formulas.

Thank you for the quick reply! I pasted the formula in cell F2 but how are you declaring F2:K10 as the dynamic range? I'm getting an error even when i try the control-alt-enter
 
Upvote 0
As usual, Fluff's solution is a BEAUTY TO BEHOLD.

I think this also works:

F2: =UNIQUE(A2:.A100)
G2: =TRANSPOSE(FILTER($B$2:.$B$100,$A$2:.$A$100=F2)) filled down
Thank you... I'm getting an error in the second formula. Should there be a period after the colon or should it be $B$2:$B$100 ?
 
Upvote 0
The "period" is one of the new features in Excel 365 (dot operator). It's possible you don't have that yet.
You can take that out and change the UNIQUE formula in F2 to: =UNIQUE(A2:A29) and modify the 29 accordingly based on your length of data in column A.
 
Upvote 0
Once again what error?
Saying "I get an error" doesn't really help us.
 
Upvote 0
What error do you get?
1739982321649.png



I highlighted F2:K10 and tried paste. If I paste it in F2 and hit control alt enter i get $NAME# in cell F2.
 
Upvote 0
With 365 you never need to use Ctrl Shift Enter.
Just paste the formula into F2 only.
 
Upvote 0

Forum statistics

Threads
1,226,796
Messages
6,193,048
Members
453,772
Latest member
aastupin

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