excelisland10
New Member
- Joined
- Jun 11, 2020
- Messages
- 1
- Office Version
- 2019
- 2016
- Platform
- Windows
Hi,
I’m kind of new to macros and having a hard time creating the following:
On my spreadsheet, I have three types of rows, let’s call them Type A, Type B, and Type C. I need a macro button that can do the following when I click it: First it asks the number of rows, I want to add and then it asks where to insert the new rows. For example, if I want to add four rows above row 275, I would enter 4 in the first prompt and 275 in the second.
I also need the different rows to contain different types of formulas. I was thinking of having templates for the three different rows (Type A, B, and C) on a different sheet and having the macro copying and pasting them based on this: the first row will always be Type A, any subsequent row will be Type B, and the last row will always be Type C. For example, with the macro above, I want to add 5 rows above row 300. So first prompt I will put in 5, then 300 in the second, and then I want the first inserted row to copy the formulas from the Type A row, rows 2-4 to have the formulas from Type B, and the fifth row to copy the formula from Type C. Also, keep in mind, the number of rows I want won’t always be five.
Any help on this would be greatly appreciated, please feel to ask questions if I made this too confusing.
I’m kind of new to macros and having a hard time creating the following:
On my spreadsheet, I have three types of rows, let’s call them Type A, Type B, and Type C. I need a macro button that can do the following when I click it: First it asks the number of rows, I want to add and then it asks where to insert the new rows. For example, if I want to add four rows above row 275, I would enter 4 in the first prompt and 275 in the second.
I also need the different rows to contain different types of formulas. I was thinking of having templates for the three different rows (Type A, B, and C) on a different sheet and having the macro copying and pasting them based on this: the first row will always be Type A, any subsequent row will be Type B, and the last row will always be Type C. For example, with the macro above, I want to add 5 rows above row 300. So first prompt I will put in 5, then 300 in the second, and then I want the first inserted row to copy the formulas from the Type A row, rows 2-4 to have the formulas from Type B, and the fifth row to copy the formula from Type C. Also, keep in mind, the number of rows I want won’t always be five.
Any help on this would be greatly appreciated, please feel to ask questions if I made this too confusing.