RESIZEARRAY

=RESIZEARRAY(array,r,c,defaultValue)

array
array to be resized
r
number of rows in resized array
c
number of columns in resized array
defaultValue
value entered in any rows or columns out-with the original array

RESIZEARRAY resizes an array to a given number of rows and columns, allowing for a default value where columns and rows are out-with the original array.

RicoS

Board Regular
Joined
May 1, 2019
Messages
62
RESIZEARRAY resizes an array to a given number of rows and columns, allowing for a default value where columns and rows are out-with the original array

Excel Formula:
=LAMBDA(array,r,c,defaultValue,
   LET(
      rA,ROWS(array),
      cA,COLUMNS(array),
      seqR,SEQUENCE(IF(r=0,rA,r)),
      seqC,SEQUENCE(,IF(c=0,cA,c)),
      return,IF(seqR>rA,defaultValue,IF(seqC>cA,defaultValue,INDEX(array,seqR,seqC))),
   return)
)

Lambda - Last Cell and Split.xlsx
BCDEFGHI
1Original ArrayResized array
21231230
34564560
47897890
51011121011120
60000
70000
Sheet1
Cell Formulas
RangeFormula
B2:D5B2=SEQUENCE(4,3)
F2:I7F2=RESIZEARRAY(B2:D5,6,4,0)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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