I can’t get my Copy Destination range below to work. I would be so grateful if an expert could help.
On a sheet called "Temp" is a block of selected cells. On the same sheet, I want the block copied to the same column and row as PrevCell (i.e. the same cell address as the "Expenses" sheet).
Sub Copy_to_same_cell_address
Dim PrevSheet As Worksheet
Dim PrevCell As Range
Set PrevSheet = ActiveSheet ' "Expenses" sheet
Set PrevCell = Range("D" & (ActiveCell.Row))
Sheets("Temp").Activate
Selection.Copy Destination:=Range("D" & (Sheets(PrevSheet).Range(PrevCell).Row))
End Sub
On a sheet called "Temp" is a block of selected cells. On the same sheet, I want the block copied to the same column and row as PrevCell (i.e. the same cell address as the "Expenses" sheet).
Sub Copy_to_same_cell_address
Dim PrevSheet As Worksheet
Dim PrevCell As Range
Set PrevSheet = ActiveSheet ' "Expenses" sheet
Set PrevCell = Range("D" & (ActiveCell.Row))
Sheets("Temp").Activate
Selection.Copy Destination:=Range("D" & (Sheets(PrevSheet).Range(PrevCell).Row))
End Sub