ExcelMonkey Wrote:
I know I can drag/fill and delte a colum range as follows below from a
recorded macro. How do I use column numbers in VBA to replicate these
acts?
Assume ahead of time I know for the drag/fill I kno my range is
C2:C17.
Also assume that for the delete I know the starting range of C19:J32.
Thanks
'Drag and fill
Range("C2:C17").Select
Selection.AutoFill Destination:=Range("C2:J17"), Type:=xlFillDefault
Range("C2:J17").Select
'Delete Range
Range("C19:J32").Select
Range("J19").Activate
Selection.ClearContents
could be..
Range("C19:J32").Select
Selection.ClearContents
Range("C19").Select
the auto fill could be this
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C17"),
Type:=xlFillDefault
Range("D2").Select
--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile:
http://www.excelforum.com/member.php...o&userid=31708
View this thread:
http://www.excelforum.com/showthread...hreadid=564089