RIGHTARRAY

=RIGHTARRAY(array,n,direction)

array
array to be evaluated
n
number of columns (or rows, or both) to be returned
direction
0 or blank returns n columns, 1 returns n rows, 2 returns n rows and columns

RIGHTARRAY returns the right n columns (or rows, or both) of an array.

RicoS

Board Regular
Joined
May 1, 2019
Messages
62
RIGHTARRAY returns the right n columns (or rows, or both) of an array

Excel Formula:
=LAMBDA(array,n,direction,
   SWITCH(direction,
      0,INDEX(array,SEQUENCE(ROWS(array)),SEQUENCE(1,n,COLUMNS(array)-n+1)),
      1,INDEX(array,SEQUENCE(n,1,ROWS(array)-n+1),SEQUENCE(,COLUMNS(array))),
      2,INDEX(array,SEQUENCE(n,1,ROWS(array)-n+1),SEQUENCE(1,n,COLUMNS(array)-n+1)),
      INDEX(array,SEQUENCE(ROWS(array)),SEQUENCE(1,n,COLUMNS(array)-n+1))
   )
)

Lambda - Last Cell and Split.xlsx
BCDEFGHIJKLMNO
1Original ArrayLeft 2 ColumnsLeft 2 RowsLeft 2 columns and rows
2thisismyismyornumberslikenumberslike
3arrayofwordsofwords12323
4ornumberslikenumberslike
512323
6
Sheet1
Cell Formulas
RangeFormula
F2:G5F2=RIGHTARRAY($B$2:$D$5,2,)
I2:K3I2=RIGHTARRAY($B$2:$D$5,2,1)
M2:N3M2=RIGHTARRAY($B$2:$D$5,2,2)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,822
Members
449,470
Latest member
Subhash Chand

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