APPEND2V

=APPEND2V(a,b,i)

a
array to be appended on top of b
b
array
i
ignored or 0 or 1 appends entire arrays, i>1 acts like row index of array b

APPEND2V appends 2 arrays vertically.

Xlambda

Well-known Member
Joined
Mar 8, 2021
Messages
832
Office Version
  1. 365
Platform
  1. Windows
APPEND2V !! recursive !! appends 2 arrays vertically
Excel Formula:
=LAMBDA(a,b,i,
    LET(j,MAX(1,i),
       ra,ROWS(a),rb,ROWS(b),s,SEQUENCE(ra+1),
       IF(j=rb+1,IFNA(a,""),APPEND2V(IF(s=ra+1,INDEX(IF(b="","",b),j,),IF(a="","",a)),b,j+1))
    )
)
LAMBDA 5.0.xlsm
ABCDEFGHIJKL
1a1XYZ
2b2ABC
3c3
4for appending entire arrays,i can be ignored 0 or 1
5a1
6b2
7c3
8XYZ
9ABC
10
11ex1:use of index(i) argument (>1),when 2nd array is already defined as a table or name
12(acts like a replace) (if I > rows(b) leaves a as it is
131Product Dblue17stock1Product Ared23sold
142Product Emagenta12sold2Product Bgreen34stock
15i=33Product Cwhite45sold
161Product Dblue17stock
172Product Emagenta12sold
183Product Cwhite45sold
19ex2: appends heders to an array
20 =APPEND2V(CHAR(SEQUENCE(,5,65)),A16#,)
21ABCDE
221Product Dblue17stock
232Product Emagenta12sold
243Product Cwhite45sold
25 =APPEND2V(SEQUENCE(,5)&" "&CHAR(SEQUENCE(,5,65)),A16#,1)
261 A2 B3 C4 D5 E
271Product Dblue17stock
282Product Emagenta12sold
293Product Cwhite45sold
30
31ex4: create unusual sequences array =APPEND2V(SEQUENCE(,3)^0,SEQUENCE(3,3,4),)
32111
33456
34789
35101112
36
AAPPEND2V
Cell Formulas
RangeFormula
A5:C9A5=APPEND2V(A1:B3,D1:F2,)
A16:E18A16=APPEND2V(A13:E14,G13:K15,3)
A21:E24A21=APPEND2V(CHAR(SEQUENCE(,5,65)),A16#,)
A26:E29A26=APPEND2V(SEQUENCE(,5)&" "&CHAR(SEQUENCE(,5,65)),A16#,1)
A32:C35A32=APPEND2V(SEQUENCE(,3)^0,SEQUENCE(3,3,4),)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,539
Members
449,169
Latest member
mm424

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