Hi all,
Stuck here, hoping someone can help. I am trying to define range as below (once i have defined this range, the next code would be to copy this range and then paste it in another sheet which I should be able to do...)
Bit I am stuck on is on how to define the range:
-the Start Range is always "D3"
-The End Range is the value in cell A1 (which is 23 - but can change)
-So effectively I would like the code to say: select range D3:DX as the value can change in A1. I am stuck on how this range should be defined. I have tried Offset but hasn't helped.
Current code looks like below, but i think I am over complicating it. I know providing an extract is usually helpful to the Guru's, but unfortunately i am not able to do this.
SubCopyandPasteList()
Dim startcell As Range
Dim endcell As Range
Set startcell = Range("D3")
'Set endcell = Range("B2").Value
endcell.Value = Range("A1")
Sheets("List").Select
Range("D3").Select
' ActiveSheet.Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column)).Select
Selection.End(xlDown).Select
Selection.End(xlUp).Offset(1).Select
End
What should the macro look like? If anyone can help that would be great.. i have tried all sorts and no avail
Thanks all.
Stuck here, hoping someone can help. I am trying to define range as below (once i have defined this range, the next code would be to copy this range and then paste it in another sheet which I should be able to do...)
Bit I am stuck on is on how to define the range:
-the Start Range is always "D3"
-The End Range is the value in cell A1 (which is 23 - but can change)
-So effectively I would like the code to say: select range D3:DX as the value can change in A1. I am stuck on how this range should be defined. I have tried Offset but hasn't helped.
Current code looks like below, but i think I am over complicating it. I know providing an extract is usually helpful to the Guru's, but unfortunately i am not able to do this.
SubCopyandPasteList()
Dim startcell As Range
Dim endcell As Range
Set startcell = Range("D3")
'Set endcell = Range("B2").Value
endcell.Value = Range("A1")
Sheets("List").Select
Range("D3").Select
' ActiveSheet.Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column)).Select
Selection.End(xlDown).Select
Selection.End(xlUp).Offset(1).Select
End
What should the macro look like? If anyone can help that would be great.. i have tried all sorts and no avail
Thanks all.