Spill Sequence referencing three columns of data

sabin348

New Member
Joined
Nov 2, 2013
Messages
25
Office Version
  1. 365
Platform
  1. Windows
I found this thread where the solution where the solution from @smozgur woks great except I have three columns of data instead of two. I'm having trouble trying to take the formula and scale it for three columns.

Here's the thread link:

Here's his formula:
Excel Formula:
= LET(stepRows, ROWS(steps),    dateRows, ROWS(dates),    seq, SEQUENCE(stepRows * dateRows, 2),    IF(ISEVEN(seq),      INDEX(dates,MOD(SEQUENCE(stepRows * dateRows)-1,dateRows)+1),      INDEX(steps, INT(((seq+1)/2-1)/dateRows)+1)    )  )= LET(stepRows, ROWS(steps),    dateRows, ROWS(dates),    seq, SEQUENCE(stepRows * dateRows, 2),    IF(ISEVEN(seq),      INDEX(dates,MOD(SEQUENCE(stepRows * dateRows)-1,dateRows)+1),      INDEX(steps, INT(((seq+1)/2-1)/dateRows)+1)    )  )
 

Attachments

  • Capture.JPG
    Capture.JPG
    58.2 KB · Views: 12

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about
Fluff.xlsm
ABCDEFGH
1
2003123A003123A
3004345B003123B
4007567003345A
5009789003345B
6003567A
7003567B
8003789A
9003789B
10004123A
11004123B
12004345A
13004345B
14004567A
15004567B
16004789A
17004789B
18007123A
19007123B
20007345A
21007345B
22007567A
23007567B
24007789A
25007789B
26009123A
27009123B
28009345A
29009345B
30009567A
31009567B
32009789A
33009789B
Sheet5
Cell Formulas
RangeFormula
F2:H33F2=LET(a,B2:B5,b,C2:C5,c,D2:D3,ra,ROWS(a),rb,ROWS(b),rc,ROWS(c),HSTACK(TOCOL(IF(SEQUENCE(,rb*rc),a,1/0),2),INDEX(b,MOD(INT(SEQUENCE(ra*rb*rc,,0,1/rc)),ra)+1),TOCOL(IF(SEQUENCE(,ra*rb),c,1/0),2,1)))
Dynamic array formulas.
 
Upvote 0
The data input for each column is very dynamic. Sometimes only a couple of rows, other times many rows. This formula is inputting zeros if there isn't anything in the cell.
 
Upvote 0
Did you set the ranges to where the data is? Or did you include blank cells?
 
Upvote 0
Did you set the ranges to where the data is? Or did you include blank cells?
Yes, as long all cells in the data range is populated, there's no problem. However, sometimes the there may be blanks at the bottom of the range to which the formula is interpreting it as zeros. Ideally, I need to either expand the the formula range to encompass a large number of rows (keeping in mind there may be blanks), or reference either a spill formula or a dynamic range.
 
Upvote 0
Are those 3 columns individual spill ranges?
 
Upvote 0
Ok, how about
Fluff.xlsm
ABCDEFGH
1
2003123A003123A
3004345B003123B
4007567003345A
5009789003345B
6003567A
7003567B
8003789A
9003789B
10004123A
11004123B
12004345A
13004345B
14004567A
15004567B
16004789A
17004789B
18007123A
19007123B
20007345A
21007345B
22007567A
23007567B
24007789A
25007789B
26009123A
27009123B
28009345A
29009345B
30009567A
31009567B
32009789A
33009789B
Sheet5
Cell Formulas
RangeFormula
B2:C5B2=I2:I5
F2:H33F2=LET(a,B2#,b,C2#,c,FILTER(D2:D10,D2:D10<>""),ra,ROWS(a),rb,ROWS(b),rc,ROWS(c),HSTACK(TOCOL(IF(SEQUENCE(,rb*rc),a,1/0),2),INDEX(b,MOD(INT(SEQUENCE(ra*rb*rc,,0,1/rc)),ra)+1),TOCOL(IF(SEQUENCE(,ra*rb),c,1/0),2,1)))
Dynamic array formulas.
 
Upvote 0
Maybe this will help clarify the problem.
 

Attachments

  • Capture.JPG
    Capture.JPG
    190.6 KB · Views: 8
Upvote 0
Oops, had the wrong value in the Mod function, it should be
Excel Formula:
=LET(a,B2#,b,C2#,c,FILTER(D2:D10,D2:D10<>""),ra,ROWS(a),rb,ROWS(b),rc,ROWS(c),HSTACK(TOCOL(IF(SEQUENCE(,rb*rc),a,1/0),2),INDEX(b,MOD(INT(SEQUENCE(ra*rb*rc,,0,1/rc)),rb)+1),TOCOL(IF(SEQUENCE(,ra*rb),c,1/0),2,1)))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,110
Messages
6,123,140
Members
449,098
Latest member
Doanvanhieu

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