raja.pamarthi9
New Member
- Joined
- Aug 10, 2011
- Messages
- 1
Hi all, i've a requirement where i need to reach the end of the table and select the previous cells/formulas and autofill the rest of the table. End of the table always varies(previous row number keep changing). Below is the code i used, can someone please suggest the changes needed. I've tried the commented lines that didn't worked.
Range("D7").Select
Selection.End(xlDown).Select
Range(ActiveCell.Offset(-4, 0), ActiveCell.Offset(-5, 3)).Select
Set temp_range = Range(ActiveCell, ActiveCell.Offset(5, 3))
Application.CutCopyMode = False
'Selection.AutoFill Destination:=temp_range.Select, Type:=xlFillDefault
'Selection.AutoFill Destination:=Range(xlDown), Type:=xlFillDefault
'Selection.AutoFill Destination:=Range(ActiveCell, ActiveCell.Offset(5, 3)), Type:=xlFillDefault
Thanks
Raja
Range("D7").Select
Selection.End(xlDown).Select
Range(ActiveCell.Offset(-4, 0), ActiveCell.Offset(-5, 3)).Select
Set temp_range = Range(ActiveCell, ActiveCell.Offset(5, 3))
Application.CutCopyMode = False
'Selection.AutoFill Destination:=temp_range.Select, Type:=xlFillDefault
'Selection.AutoFill Destination:=Range(xlDown), Type:=xlFillDefault
'Selection.AutoFill Destination:=Range(ActiveCell, ActiveCell.Offset(5, 3)), Type:=xlFillDefault
Thanks
Raja