I'm trying to write a macro which selects a range of cells to copy and paste values over. The range of cells selected will vary depending on the "RowOff" value. But the starting cell will always be Z12.
I was trying to use the offset function but the macro only seems to be selecting one cell. I think it might be to do with the range but I am not sure how to amend my code.
How do i fix it?
Thanks
Sub FixFOT()
Dim RowOff As String
RowOff = Sheet29.Range("C5").Value
Sheet10.Select
Range("Z12").Offset(165, RowOff).Copy
Range("Z12").Offset(165, RowOff).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub