Row Insertion

arehman1289

New Member
Joined
Dec 10, 2020
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hello
I have a sheet in which I ask the user to input the number of branches. Based on this input Id like to write a VBA that could dublicate the next rows and formulas in it. As an example in the attached image, if the user enters 3, i would like to duplicate the next 4 rows (highligted in yellow), 3 times.

I have very basic skills at the moment in the developer TAB and I am learning at the moment. Any help would be highly appreciated.

Thank you
 

Attachments

  • Capture.PNG
    Capture.PNG
    5.1 KB · Views: 9
What row is it copying FROM and what row is it copying TO?
It is copying from row 10 to 17 in a worksheet thats why the default increment is 7.
However the reference values in the formula are from another workssheet, thats why I would like them to increment by 15. Only the C cell values. If required I can private message the file ?
Thank you loads for your support.

For the second part, ill follow your advice and implement it later on.
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
However the reference values in the formula are from another sheet, thats why I would like them to increment by 15.
Like I said, you should post that to a new question, since it is a new question, but be sure to include all the impoertant details.
But be sure to include all details (i.e. exactly what range you are copying from/to). That could impact on how they develop the solution.

The general rule of thumb is this:
1. If you have a directly-related follow-up/clarification question on a reply in your original question, you can post it back to the same thread.
2. If you have a new question (even if it is on the same code/problem you are working on), it is best to post it to new thread. That way it will appear as a new question, and you will get more "looks" (and there is no guarantee that the person who helped you with the first issue has the answer to your second, so you do not want to assume that).
 
Upvote 0

Forum statistics

Threads
1,215,695
Messages
6,126,263
Members
449,307
Latest member
Andile

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