Auto insert 'x' rows depending on value 'y'

December 16, 2014 at 19:39:04
Specs: windows 7

I am currently using Excel 2003 but I am a beginner at using VB. What I am looking to do is either create a formula or macro, which ever is easier or better, and I want it to insert a new row(s) under a particular section based on how ever many items are selected.
I have a drop down which contains a a number list from 1-20. So if 1 is selected then only 1 row will be inserted automatically or if 20 is selected then 20 rows can be auto inserted.
I have pre designed how these inserted rows should look once auto inserted, so is there a way when the rows are inserted they will appear the way i have designed them to or is not possible?
Also im looking to duplicate that same info on a separate sheet within the same excel document.
Can this all be done and is there anyone eho can help solve this for me?
Would be greatly appreciated.

See More: Auto insert x rows depending on value y

Report •

December 16, 2014 at 19:53:15
You will have to use VBA because a formula can not perform any action other than calculate a result within the cell that it resides. A formula can not insert rows, format a cell, etc.

Before we can offer any code we would need a lot more details such as where are the rows supposed to be inserted, what do you mean by "duplicate that same info on a separate sheet", etc.

Keep in mind that we can not see your spreadsheet from where we are sittng, so the more details you can provide and the clearer you are with your explanation, the better the chance that we can offer a solution.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question