Hi all,
First post here, so thanks for reading.
I have a table that I done lots of work on but need to alter it by adding lots of extra rows to certain worksheets within the Excel file. Because I can't start over, I need to find a way to automate what I can easily do manually to speed up the process. I have over 2000 lines to do and it will take me a long time. I have recorded a Macro and it works great- for the one cell I recorded it for!
Ideally, I could do with the cell I take the data from to automatically fill in a certain part of the code so I can just run that code in the next cell, then the next, then the next etc (OR maybe all at once or in batches if possible).
Does anyone have any ideas how to do this.
The code I have that works great manually (for only the cell I record it on) is this...
-------------------------------------
----------------------------------
First post here, so thanks for reading.
I have a table that I done lots of work on but need to alter it by adding lots of extra rows to certain worksheets within the Excel file. Because I can't start over, I need to find a way to automate what I can easily do manually to speed up the process. I have over 2000 lines to do and it will take me a long time. I have recorded a Macro and it works great- for the one cell I recorded it for!
Ideally, I could do with the cell I take the data from to automatically fill in a certain part of the code so I can just run that code in the next cell, then the next, then the next etc (OR maybe all at once or in batches if possible).
Does anyone have any ideas how to do this.
The code I have that works great manually (for only the cell I record it on) is this...
-------------------------------------
VBA Code:
Sub AutoTranspose()
'
' AutoTranspose Macro
'
'
Range("B4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "='005- Machine Mechanical Kanbans'!R[1379]C4"
Range("B4").Select
Selection.AutoFill Destination:=Range("B4:B19"), Type:=xlFillDefault
Range("B4:B19").Select
Selection.Copy
Range("D73").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End Sub
----------------------------------
Last edited by a moderator: