Add certain number of rows based on ActiveCell row value with buttons question
I have a sheet for ticket sales for an event we are hosting.
What I would like to be able to do is add buttons to the sheet that will add a certain number of rows when clicked, with the ActiveCell value being copied downward into the rows. Example would be "Name A" in cell A1, and we want the A1 through A5 to be "Name A", so when A1 is clicked/selected then the button should copy A1 value and paste it into the 4 rows below and stop. And then if we put "Name B" in A6 and wanted 5 rows total again it would copy from A6 into the next 4 rows below A6.
EDIT: There are multiple sheets in this workbook, we only need these buttons to work on the one sheet.
Sample sheet link: https://docs.google.com/spreadsheets/d/15jbg6KTz0xKmFpj7AGdBlSS8dT0ZuOoDy0uWy_5ESpA/edit#gid=2100307022
Posted May 3, 2022, 12:47 AM UTC · edited
If this resolves your need for assistance, please mark the post solved by replying to this comment with solution verified. Doing so will also award me a Clippy Point and make the solution easier to find for people with a similar question. Cheers!
The instructions are in the document:
https://docs.google.com/spreadsheets/d/1kui4gd6yjraOfHhxuJX8JH2ut\_l7h8jyrdzobRbWHk8/copy
Hi there, this sort of does what I need it to do, but not exactly.
What I'm looking for is a script I can run or attach to a button on the sheet to specifically copy from the selected active cell to a preset/specified number of cells.
This is to record ticket sales at a buck n doe we are having, so if someone buys 15 tickets for $20, I would like input the person's name once, and then click the button to copy their name 14 times below the initial entry to save on time as tickets are physically sold at the event and to copy and paste the proper # of rows is a pain
Given what the use is, why not just have a quantity column for when they purchase?
It's not the easiest tracking as it's based on per ticket number as the base value and then names are attached to the ticket number and then what corresponding prize number as well.
So someone could purchase 3 tickets, ticket #1 is for prize #1, ticket #2 is for prize #2 etc.
We just wanted a faster way to copy the active cell with the name in down a certain number of rows below the active row (+14 rows below active to give a total of 15 rows with X name in them)
Gotcha. I'll revisit and see what can come up with. Hopefully tomorrow I can have another go.