Could I have some help with this project? Repeat a set of cells down the length of a column

moonsugar

New Member
Joined
Jan 23, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there!

I've been using Google Sheets for some years, and have just come back to Excel for the first time since 2007.
I've just spent perhaps the better part of an hour trying to search for what I'm trying to accomplish, with no luck.
Somehow I've managed to do it before a few times, but I guess I keep forgetting?
Anyway, here's what I'm working with:

Game.xlsx
AB
1Very long pause
2Run
3Short pause
4Jump
5Wait
6Enter
7Long pause
8Look
9Short pause
10Apple
11Short pause
12Jump
13Short pause
14Enter
15Short pause
16Run
17Short pause
18Enter
19Long pause
20Look
21Short pause
22Banana
23Short pause
24Jump
25Short pause
26Enter
27Short pause
28Run
29Short pause
30Enter
31Long pause
32Look
33Short pause
34Coconut
Fruit



Here, the blue cells go at the beginning. The green cells are the steps I'd like repeated, until I reach the bottom of the spreadsheet, which will be row 33237. The yellow cells are the fruit variables - we see here apple, banana and coconut, but there are 2769 of them.

It's important to leave a space after each set of green cells because after I've copied them down to the bottom of the sheet, I'm going to merge columns A and B together with "A1&B1", "A2&B2", "A3&B3" etc.

The end result should look like this:

Game.xlsx
A
1Very long pause
2Run
3Short pause
4Jump
5Wait
6Enter
7Long pause
8Look
9Short pause
10Apple
11Short pause
12Jump
13Short pause
14Enter
15Short pause
16Run
17Short pause
18Enter
19Long pause
20Look
21Short pause
22Banana
23Short pause
24Jump
25Short pause
26Enter
27Short pause
28Run
29Short pause
30Enter
31Long pause
32Look
33Short pause
34Coconut
Fruit


But for all 2769 variables.

Currently, the rest of the sheet below "coconut" looks like this.

Game.xlsx
AB
22Banana
23Short pause
24Jump
25Short pause
26Enter
27Short pause
28Run
29Short pause
30Enter
31Long pause
32Look
33Short pause
34Coconut
35
36
37
38
39
40
41
42
43
44
45
46Dragonfruit
47
48
49
50
51
52
53
54
55
56
57
58Elderberry
Fruit


What is the best way to go about populating the series of 11 steps plus one blank space in column A, as seen with "banana", for the other ~2700 fruit variables?

Because of the size of the data, it seems inefficient to click and drag with the fill handle (not that I've been able to get it to work recently anyway) - especially if I want to upscale it in the future. I've been using CTRL+Home and CTRL+End to navigate from the top to the bottom of the sheet. Columns C through XYZ, and rows 33238-100000 are hidden for ease of navigation.

I've come here with my specific problem so that rather than just apply a solution and forget how to do it ten minutes later, I can use this as a framework to solve other similar problems in the future. Many kind thanks to anyone with help or advice!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi .a few suggestion to populate 11 step(could be text ,number ,...) Plus Blank (Total 12 step )

Excel Message board.xlsm
A
11
22
33
44
55
66
77
88
99
1010
1111
12
131
Sheet1
Cell Formulas
RangeFormula
A13A13=A1


put = A1 on 13th row
then type A33238 on Cell address bar
Enter
Ctrl+Shift+UP
Ctrl+D
Copy
Paste as value
Ctrl+F (Fine 0 and Delete)

Hope this is useful!
 

Attachments

  • Screenshot (44).png
    Screenshot (44).png
    8.7 KB · Views: 12
Upvote 0
Like this?
VBA Code:
Sub Maybe()
With Range("A23:A" & Cells(Rows.Count, 2).End(xlUp).Row + 11)
    .Formula = "=R[-12]C"
    .Value = .Value
End With
End Sub
 
Upvote 0
Like this?
VBA Code:
Sub Maybe()
With Range("A23:A" & Cells(Rows.Count, 2).End(xlUp).Row + 11)
    .Formula = "=R[-12]C"
    .Value = .Value
End With
End Sub
I haven't heard of VBA codes before. Is there anything I should know?


Hi .a few suggestion to populate 11 step(could be text ,number ,...) Plus Blank (Total 12 step )

Excel Message board.xlsm
A
11
22
33
44
55
66
77
88
99
1010
1111
12
131
Sheet1
Cell Formulas
RangeFormula
A13A13=A1


put = A1 on 13th row
then type A33238 on Cell address bar
Enter
Ctrl+Shift+UP
Ctrl+D
Copy
Paste as value
Ctrl+F (Fine 0 and Delete)

Hope this is useful!
This seems like it could do the trick! If I want to make some adjustments to the steps, will the rest of the document update as well?
 
Upvote 0
And there is always your favourite search site to find out how to insert macros into your project.

Don't quote if not necessary, which it seldom is. Refer to Post numbers instead.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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