Copying and pasting a range x times based on user-defined value of x

T

tribbleorlfl

I posted this in the members section, but haven't received a solutio
to my problem yet.

Essentially I have a problem where I have a row with some user input
and formulas that calculate based on those user inputs. There i
another user input field (on another sheet) where they enter in a numbe
("x").

I'm trying to create a macro that will paste that row with formulas "x
times based on the user-defined value of the "x" field.

In other words, if the user types in 40 in the user field, the macr
pastes the row with formulas 39 times (since the row being copie
already exists) below the existing row. The value for this field wil
be variable each time the user opens and uses this workbook.

any idea how to make this work? Originally I was going the route o
having the row pre-copied say 200 times (since I don't anticipate th
user-defined value of "x" exceeding 200) and then developing a macr
that would hide the unneeded rows (in other words, if the user entere
40 for "x", the bottom 160 rows would be hidden), but it has bee
suggested that is inefficient.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top