How to get a spill of multiple SEQUENCES side-by-side, based on an input array {n1,n2,etc.}?

Rnkhch

Well-known Member
Joined
Apr 28, 2018
Messages
578
Office Version
  1. 365
Platform
  1. Windows
Hello,

Suppose I have the following expression to generate a sequence:

=LET(n,3,SEQUENCE(6,,n,1))

which generates {3;4;5;6;7;8}

Now, what if n was an array itself, like this {3,4} or {3;4}? How can I make the LET expression =LET(n,{3,4},SEQUENCE(6,,n,1)) or =LET(n,{3;4},SEQUENCE(6,,n,1))
generate a side-by-side spill of the following array:

{3;4;5;6;7;8,4;5;6;7;8;9}

I tried MAP, but I got the nested array not supported error.

I would appreciate any input! 🤗

Blank power workbook1
ABCDEFGHIJKL
1
23343#CALC!
344
45
56
67
78
8
9desired outputdesired outputdesired output
10343434
11454545
12565656
13676767
14787878
15898989
16
Sheet1
Cell Formulas
RangeFormula
B2:B7B2=LET(n,3,SEQUENCE(6,,n,1))
D2:E2D2=LET(n,{3,4},SEQUENCE(6,,n,1))
G2:G3G2=LET(n,{3;4},SEQUENCE(6,,n,1))
J2J2=LET(n,{3,4},MAP(n,LAMBDA(n,SEQUENCE(6,,n,1))))
Dynamic array formulas.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi

=LET(n,3,k,SEQUENCE(6,,n,1),CHOOSE({1.2},k,k+1))
 
Upvote 0
Have a go with:

Excel Formula:
=DROP(REDUCE(0,{3,4},LAMBDA(a,b,HSTACK(a,SEQUENCE(6,,b)))),,1)

Or a bit simpler:

Excel Formula:
={3,4}+SEQUENCE(6,,0)
 
Last edited:
Upvote 0
Wow 😮, those are very interesting ways of using SEQUENCE! Thank you both! 🤗

(Thinking of your solutions raised another interesting question in my mind, which is how to intercalate multiple SEQUENCEs, which I'll post separately.)
 
Upvote 0
Building up on this, how can the "step" be incorporated in the SEQUENCE as the same array of numbers (in this case {3,4}), such that each column gets its respective step, as below:

Blank power workbook1
ABCDEFGH
1
2desired output
33434
44568
556912
6671216
7781520
8891824
9
Sheet1
Cell Formulas
RangeFormula
B3:C8B3={3,4}+SEQUENCE(6,,0)
Dynamic array formulas.


I tried putting the {3,4} for the step, but it didn't work.
 
Upvote 0
How about
Excel Formula:
={3,4}*SEQUENCE(6)
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,875
Messages
6,181,513
Members
453,050
Latest member
Obil

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