How can I repeat and spill like the picture example?

VBE313

Well-known Member
Joined
Mar 22, 2019
Messages
686
Office Version
  1. 365
Platform
  1. Windows
How can I create a formula that will repeat each item in the first column and spill with each date listed in the column next to it?

Snag_5414f6.png
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
@VBE313 - It looks like you asked this question by forgetting that it was already answered in one of your old questions. I can delete this thread. Otherwise, it will be really strange to mark your own post as the solution that leads to one of your own questions answered by someone else.

Or, another approach, I will provide an alternative LET solution, and then we can keep the thread live as it will provide an alternative solution to the future readers.

Book1
ABCDE
1Step 14/14/21Step 14/14/21
2Step Two4/15/21Step 14/15/21
3Type Three4/16/21Step 14/16/21
44/17/21Step 14/17/21
54/18/21Step 14/18/21
64/19/21Step 14/19/21
74/20/21Step 14/20/21
84/21/21Step 14/21/21
94/22/21Step 14/22/21
10Step Two4/14/21
11Step Two4/15/21
12Step Two4/16/21
13Step Two4/17/21
14Step Two4/18/21
15Step Two4/19/21
16Step Two4/20/21
17Step Two4/21/21
18Step Two4/22/21
19Type Three4/14/21
20Type Three4/15/21
21Type Three4/16/21
22Type Three4/17/21
23Type Three4/18/21
24Type Three4/19/21
25Type Three4/20/21
26Type Three4/21/21
27Type Three4/22/21
Sheet1
Cell Formulas
RangeFormula
D1D1= 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) ) )
Named Ranges
NameRefers ToCells
dates=Sheet1!$B$1:$B$9D1
steps=Sheet1!$A$1:$A$3D1


In fact, we don't even have to name the ranges but select whole range and let the function deal with the separation:

Book1
ABCDE
1Step 14/14/21Step 14/14/21
2Step Two4/15/21Step 14/15/21
3Type Three4/16/21Step 14/16/21
44/17/21Step 14/17/21
54/18/21Step 14/18/21
64/19/21Step 14/19/21
74/20/21Step 14/20/21
84/21/21Step 14/21/21
94/22/21Step 14/22/21
10Step Two4/14/21
11Step Two4/15/21
12Step Two4/16/21
13Step Two4/17/21
14Step Two4/18/21
15Step Two4/19/21
16Step Two4/20/21
17Step Two4/21/21
18Step Two4/22/21
19Type Three4/14/21
20Type Three4/15/21
21Type Three4/16/21
22Type Three4/17/21
23Type Three4/18/21
24Type Three4/19/21
25Type Three4/20/21
26Type Three4/21/21
27Type Three4/22/21
Sheet3
Cell Formulas
RangeFormula
D1D1= LET(data, $A$1:$B$9, stepRows, COUNTA(INDEX(data,,1)), dateRows, COUNTA(INDEX(data,,2)), seq, SEQUENCE(stepRows * dateRows, 2), IF(ISEVEN(seq), INDEX(data,MOD(SEQUENCE(stepRows * dateRows)-1,dateRows)+1,2), INDEX(data, INT(((seq+1)/2-1)/dateRows)+1,1) ) )
 
Upvote 0
Solution
@smozgur This formula is perfect and helps me with my project. I need to modify it for three columns of data, but I'm struggling to adjust it. Can you help, or do I need to start a new thread?
 
Upvote 0
@smozgur This formula is perfect and helps me with my project. I need to modify it for three columns of data, but I'm struggling to adjust it. Can you help, or do I need to start a new thread?
Yes, please create a new thread for your own question that refers to this thread with a link and/or use the formula from here that helped you in your project.
 
Upvote 0

Forum statistics

Threads
1,223,921
Messages
6,175,379
Members
452,639
Latest member
RMH2024

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