Combine 2 tables into one table

Chewyhairball

Active Member
Joined
Nov 30, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
Hi Guys

I am wondering what the best way to combine 2 table of data into one table not using a pivot table or VBA

Here is my example below.

1638395857817.png


thanks

Rory
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
How about using Power Query.

xhtml.html.xlsm
CDEFGHIJKLMNO
3ItemUse by DateStockItemUse by DateStockItemUse by DateStock
4Banana3/2/202122Orange2/4/202112Banana3/2/2021 0:0022
5Apple3/4/20213Apple4/3/20216Apple3/4/2021 0:003
6Pear5/2/202112Pear6/5/20218Pear5/2/2021 0:0012
7Apple3/5/20213Strawberry3/1/202132Apple3/5/2021 0:003
8Mango5/4/202141Lemon2/2/202121Mango5/4/2021 0:0041
9Orange2/4/2021 0:0012
10Apple4/3/2021 0:006
11Pear6/5/2021 0:008
12Strawberry3/1/2021 0:0032
13Lemon2/2/2021 0:0021
Sheet6


Power Query:
let
    Source = Table.Combine({Table4, Table6})
in
    Source
 
Upvote 0
How about using Power Query.

xhtml.html.xlsm
CDEFGHIJKLMNO
3ItemUse by DateStockItemUse by DateStockItemUse by DateStock
4Banana3/2/202122Orange2/4/202112Banana3/2/2021 0:0022
5Apple3/4/20213Apple4/3/20216Apple3/4/2021 0:003
6Pear5/2/202112Pear6/5/20218Pear5/2/2021 0:0012
7Apple3/5/20213Strawberry3/1/202132Apple3/5/2021 0:003
8Mango5/4/202141Lemon2/2/202121Mango5/4/2021 0:0041
9Orange2/4/2021 0:0012
10Apple4/3/2021 0:006
11Pear6/5/2021 0:008
12Strawberry3/1/2021 0:0032
13Lemon2/2/2021 0:0021
Sheet6


Power Query:
let
    Source = Table.Combine({Table4, Table6})
in
    Source
Hi. I have never used power query and dont think it is even on here. It is a works PC so we cant load anything new on.
 
Upvote 0
K, how about this?

xhtml.html.xlsm
CDEFGHIJKLMN
3ItemUse by DateStockItemUse by DateStockItemUse by DateStock
4Banana3/2/202122Orange2/4/202112Banana3/2/202122
5Apple3/4/20213Apple4/3/20216Apple3/4/20213
6Pear5/2/202112Pear6/5/20218Pear5/2/202112
7Apple3/5/20213Strawberry3/1/202132Apple3/5/20213
8Mango5/4/202141Lemon2/2/202121Mango5/4/202141
9Orange2/4/202112
10Apple4/3/20216
11Pear6/5/20218
12Strawberry3/1/202132
13Lemon2/2/202121
Sheet6
Cell Formulas
RangeFormula
L4:N13L4=LET(tbl,FILTERXML("<a><b>" & SUBSTITUTE(TEXTJOIN(",",1,TEXTJOIN(",",1,C4:E8),TEXTJOIN(",",1,H4:J8)),",","</b><b>") & "</b></a>","//b"),INDEX(tbl,SEQUENCE(ROWS(tbl)/3,3)))
Dynamic array formulas.
 
Upvote 0
K, how about this?

xhtml.html.xlsm
CDEFGHIJKLMN
3ItemUse by DateStockItemUse by DateStockItemUse by DateStock
4Banana3/2/202122Orange2/4/202112Banana3/2/202122
5Apple3/4/20213Apple4/3/20216Apple3/4/20213
6Pear5/2/202112Pear6/5/20218Pear5/2/202112
7Apple3/5/20213Strawberry3/1/202132Apple3/5/20213
8Mango5/4/202141Lemon2/2/202121Mango5/4/202141
9Orange2/4/202112
10Apple4/3/20216
11Pear6/5/20218
12Strawberry3/1/202132
13Lemon2/2/202121
Sheet6
Cell Formulas
RangeFormula
L4:N13L4=LET(tbl,FILTERXML("<a><b>" & SUBSTITUTE(TEXTJOIN(",",1,TEXTJOIN(",",1,C4:E8),TEXTJOIN(",",1,H4:J8)),",","</b><b>") & "</b></a>","//b"),INDEX(tbl,SEQUENCE(ROWS(tbl)/3,3)))
Dynamic array formulas.
That’s pretty cool. Does the trick!
Thank you very much.
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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