Hello, I have a data sheet where the number in Column C is a number that fluctuates between 0 and 64. I need to be able to add (x-1) rows above it. So if the number is 4, I'd like to add 3 rows above it (and copying all the other data from the same row). If above is not possible, then below is OK too. As an additional condition (but less important one), it would be good if in the inserted rows could count from 0 to the number it was based off (so in the previous example, the 3 rows would have 1, 2, 3 and end with 4). If that last sentence was too confusing, then just ignore it and I can make an IF function to build that out.

I think a macro is possible to make this happen but I have no macro experience at all.

Any help on this problem?

Thank you so much for any help you may provide.

There are parts of the question that don't make sense. In your example you said you want to add 3 rows because Coulmn C contained a 4. Then you said you want your numbering scheme to start at 0, yet you said the new rows should contain 1, 2, 3. Where does the zero go?

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

Hi. Sorry I misspoke. There should be no zero and it should start counting from 1. Here's what my data set looks like:

C

4

3

5And I would like it to expand to:

C

4

1

2

3

3

1

2

5

1

2

3

4Though if the numbers could go above so that it's sequentially 1,2,3,4, it would be better though below is fine.

Thank you so much for your help!

Ask Your Question

Weekly Poll