adding rows into the table

R

rbacon100

Hi all.

I have a problem.

I need to add rows based on cell value.

Cell is C39

So if in C39 is 2 I need 2 rows in table.

Table starts B54 and ends H54
So basically if cell C39 is 2 then I need rows 55 and 56 added.

F55 has formula in it so I would love to formula stay this way.

So one more example.

C39 has value 3

I want 3 rows to be added to table. So it needs to be empty table rows 55,56 and 57 but only in table. Table would be B55:H57.

And if I put 2 into c39 that it show only 2 rows like that.

If it possible to add to B55 Machine1, so if 3 rows are there, it would be B55 Machine 1, B56 Machine 2, B57 Machine 3, etc and column F to stay with formula.

Thanks
 
I

isabelle

hi,

Sub test1()
Range("A52:F52").AutoFill Destination:=Range("A52:F" & 52 + [C36]),
Type:=xlFillSeries
End Sub

isabelle

Le 2014-04-17 14:32, (e-mail address removed) a écrit :
 

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