LIST.COMBINE

LIST.COMBINE(list_1,list_2)
list_1
a 1-dimensional array
list_2
a 1-dimesnional aray

LIST.COMBINE takes two lists and returns a single list.

tboulden

Board Regular
Joined
Jan 14, 2021
Messages
73
Office Version
  1. 365
Platform
  1. Windows
LIST.COMBINE takes two lists and returns a single list.

This is a beginner's version of List.Combine from Power Query; although lists are comma-delimited in Power Query and display vertically, commas delimit columns in arrays and display horizontally. I've opted to have List.Combine display vertically here; if you prefer horizontally, change k,SEQUENCE(i+j) => k,SEQUENCE(1,i+j).

This is a "dumb" version as it is agnostic about the orientation of the lists its combining. A smarter version that handles 2-D and orientations is @RicoS COMBINEARRAYS.

Excel Formula:
=LAMBDA(
    list_1,
    list_2,
    LET(
        i,COUNTA(list_1),
        j,COUNTA(list_2),
        k,SEQUENCE(i+j),
        IF(
            k<=i,INDEX(list_1,k),
            INDEX(list_2,k-i)
        )
    )
)

LAMBDA_Testing_ListCombine.xlsm
ABCDEF
1Anonymous:1123
22
33A
4AB
5BC
6C
7
8Named:1
92
103
11A
12B
13C
Scratch
Cell Formulas
RangeFormula
B1:B6B1=LAMBDA(list₁,list₂,LET(i,COUNTA(list₁),j,COUNTA(list₂),k,SEQUENCE(i+j),IF(k<=i,INDEX(list₁,k),INDEX(list₂,k-i))))(D1#,D3#)
D1:F1D1={1,2,3}
D3:D5D3=CHAR(SEQUENCE(3,1,65))
B8:B13B8=List.Combine(D1#,D3#)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

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