I have a code below which supposedly copies the values in a range of cells and pastes them at another location, but it is not working for some reason.
For sheetnumber = 2 To ThisWorkbook.Sheets.Count
Set currentsheet = ThisWorkbook.Sheets(sheetnumber)
currentsheet.Range(Cells(11, 4), Cells(25, 4)).Copy
currentsheet.Paste Destination:=currentsheet.Cells(11, 3)
Next sheetnumber
However, when i use currentsheet.Range("D11:D25").Copy
, it works and is able to copy the selected range of cells. So may I know why cant currentsheet.Range(Cells(11, 4), Cells(25, 4)).Copy
work? Or is there another alternative such that I can write currentsheet.Range("D11:D25").Copy
such that my column (D in this case) can be expressed in terms of a variable? Thank you.