PDA

View Full Version : Copy a varying range



wes2706
03-31-2017, 07:14 AM
I need to select a range, copy it and paste it in anther sheet.
But the range that I need to select is rather complicated.
The previous code calculates 2 numbers:
Start_Row
Length_Row
I need to select from
Cells (Start_Row, 2) to Cells (Start_Row+ Length_Row-1, 2)
Then copy this range and do ‘paste values’ only in a sheet called “Temp123” in cell $C$6.
Can somebody please help.

mana
03-31-2017, 07:23 AM
Sheets("Temp123").Cells(6, 3).Resize(Length_Row).Value = Cells(Start_Row, 2).Resize(Length_Row).Value