Rearranging data

excel_beta_345User

New Member
Joined
Jun 17, 2024
Messages
12
Office Version
  1. 365
Platform
  1. Windows
I have two tables as per attached images. Now I want to take data from table 2 and arrange that in table 3 in such order that it matches names as per Column A from table 1. If name matches the cell from Colum A of table 1 A then only it should list all the details in row in table 3. In case if it does not match then it should not be added at all, row should remain blank. It would be great if those non-matched name and their details from table 2 are added at the end of table 3 but if not, I can apply conditional formatting to find out those non matching between table 2 and 3 and cut paste them to move out at the end of table 3, hope that works.

Common factor between table 1 and 3 should be Column with Header "Name". Name in column J should be able to match the same order as of Column A. Can you please help to achieve this?

Sorry that I cannot use XL2BB add-in, unfortunately 0365 policies does not allow that hence had to share image again.
 

Attachments

  • 4.jpg
    4.jpg
    178.8 KB · Views: 27
See if this is what you want.

25 01 23.xlsm
ABCDEFGHIJKL
2NameJerseyTeamDateNameCarCountryNameCarCountry
3PeleAlfredo Di StefanoG3H3 
4Diego MaradonaFerenc PuskasG4H4
5Lionel MessiXavi HernandezG5H5Lionel MessiG9H9
6Cristiano RonaldoGarrinchaG6H6
7Johan CruyffFranz BeckenbauerG7H7
8Szinedine ZidaneGeorge BestG8H8
9Michel PlatiniLionel MessiG9H9
10Franz BeckenbauerFranz BeckenbauerG7H7
11GarrinchaGarrinchaG6H6
12George BestGeorge BestG8H8
13Alfredo Di StefanoG3H3
14Ferenc PuskasG4H4
15Xavi HernandezG5H5
16
Rearrange
Cell Formulas
RangeFormula
J3:L15J3=VSTACK(MAKEARRAY(ROWS(A3:A12),3,LAMBDA(r,c,IFERROR(INDEX(F3:H9,MATCH(INDEX(A3:A12,r),F3:F9,0),c),""))),FILTER(F3:H9,ISNA(MATCH(F3:F9,A3:A12,0))))
Dynamic array formulas.
Thank you so much Peter for your help, this worked.
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Here's another option:
Book1
ABCDEFGHIJKL
2NameJerseyTeamDateNameCarCountryNameCarCountry
3PeleAlfredo Di StefanoG3H3 
4Diego MaradonaFerenc PuskasG4H4
5Lionel MessiXavi HernandezG5H5Lionel MessiG9H9
6Cristiano RonaldoGarrinchaG6H6
7Johan CruyffFranz BeckenbauerG7H7
8Szinedine ZidaneGeorge BestG8H8
9Michel PlatiniLionel MessiG9H9
10Franz BeckenbauerFranz BeckenbauerG7H7
11GarrinchaGarrinchaG6H6
12George BestGeorge BestG8H8
Sheet11
Cell Formulas
RangeFormula
J3:L12J3=IFNA(DROP(REDUCE("",A3:A12,LAMBDA(x,y,VSTACK(x,FILTER(F3:H9,F3:F9=y,"")))),1),"")
Dynamic array formulas.
 
Upvote 0
Here's another option:
.. but it doesn't produced the expected results shown in post 1 - unless you append the remaining rows from Table 2

25 01 23.xlsm
ABCDEFGHIJKL
2NameJerseyTeamDateNameCarCountryNameCarCountry
3PeleAlfredo Di StefanoG3H3 
4Diego MaradonaFerenc PuskasG4H4
5Lionel MessiXavi HernandezG5H5Lionel MessiG9H9
6Cristiano RonaldoGarrinchaG6H6
7Johan CruyffFranz BeckenbauerG7H7
8Szinedine ZidaneGeorge BestG8H8
9Michel PlatiniLionel MessiG9H9
10Franz BeckenbauerFranz BeckenbauerG7H7
11GarrinchaGarrinchaG6H6
12George BestGeorge BestG8H8
13Alfredo Di StefanoG3H3
14Ferenc PuskasG4H4
15Xavi HernandezG5H5
16
Rearrange (2)
Cell Formulas
RangeFormula
J3:L15J3=VSTACK(IFNA(DROP(REDUCE("",A3:A12,LAMBDA(x,y,VSTACK(x,FILTER(F3:H9,F3:F9=y,"")))),1),""),FILTER(F3:H9,ISNA(MATCH(F3:F9,A3:A12,0))))
Dynamic array formulas.
 
Upvote 0
A little shorter.
Book1
ABCDEFGHIJKL
2NameJerseyTeamDateNameCarCountryNameCarCountry
3PeleAlfredo Di StefanoG3H3 
4Diego MaradonaFerenc PuskasG4H4
5Lionel MessiXavi HernandezG5H5Lionel MessiG9H9
6Cristiano RonaldoGarrinchaG6H6
7Johan CruyffFranz BeckenbauerG7H7
8Szinedine ZidaneGeorge BestG8H8
9Michel PlatiniLionel MessiG9H9
10Franz BeckenbauerFranz BeckenbauerG7H7
11GarrinchaGarrinchaG6H6
12George BestGeorge BestG8H8
13Alfredo Di StefanoG3H3
14Ferenc PuskasG4H4
15Xavi HernandezG5H5
Sheet15
Cell Formulas
RangeFormula
J3:L15J3=IFNA(DROP(REDUCE("",UNIQUE(VSTACK(A3:A12,F3:F9)),LAMBDA(x,y,VSTACK(x,FILTER(F3:H9,F3:F9=y,"")))),1),"")
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,226,067
Messages
6,188,700
Members
453,493
Latest member
BRACE

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