I have a spreadsheet with data in columns A through to G.
The data starts on row 6 in column A, which is populated to the last line with a name. Columns B to G may or may not contain a value. The data always starts on row 6.
I am trying to copy formulae from a worksheet named control to I6:to the last line of data in column A (ie line 268 as in the following code).
Sheets("Control").Select
Range("I5:L5").Select
Selection.Copy
Sheets("Sheet4").Select
Range("I6:I268").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
The problem is the information in column A may vary on a monthly basis, so row I268 may be lower or higher. I assume I may be able to use some sort of offset command or lastrow command but can't quite get my head around which would be best.
Any help would be appreciated.
Thanks
keltic
The data starts on row 6 in column A, which is populated to the last line with a name. Columns B to G may or may not contain a value. The data always starts on row 6.
I am trying to copy formulae from a worksheet named control to I6:to the last line of data in column A (ie line 268 as in the following code).
Sheets("Control").Select
Range("I5:L5").Select
Selection.Copy
Sheets("Sheet4").Select
Range("I6:I268").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
The problem is the information in column A may vary on a monthly basis, so row I268 may be lower or higher. I assume I may be able to use some sort of offset command or lastrow command but can't quite get my head around which would be best.
Any help would be appreciated.
Thanks
keltic