Excel macro - counting inserted rows -


I am copying data from a sheet and I have a universal counter, x.

 Range ("B2: B6") Copy Destination: = Sheets ("GreatDay"). Range ("A" and "X" x = x + 1   

So I insert 5 rows and get the following field data; A2, A3, A4, A5, A6. X Currently 3 Sheets ("Info") Select Range ("B10"). Copy Destination: = Sheets ("Greatidia"). Range ("A "& Amp; x)

So now 1 line is inserted, but the data will be overwritten to cell A3. With the number of fields added in the previous copy, X 'How to Add So what does 'x' 7 become?

Many thanks!

You can use rows, calculate

  x = x + range ("b2: b6"). Rows.account    

Comments