B
bhussey
I need a way to automatically define a worksheet's range as well as
number of rows. The current recorded macro has a range of A1:A300 but
the value could change. Tomorrow I could have a range of A1:A50 or
A1:A550. I need to be able to accommodate a worksheet with any number
of rows.
Range("F1:L1").Select
Selection.AutoFill Destination:=Range("F1:L200")
Range("F1:L200").Select
Range("F1").Select
Columns("L:L").Select
Selection.Copy
Range("F33").Select
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Range("A1").Select
Rows("1:2").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A1").Select
Sheets("ARPWVoid_120805").Select
Range("A1:A2").Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Range("A6").Select
ActiveWindow.ScrollRow = 9185
ActiveWindow.SmallScroll Down:=387
ActiveWindow.ScrollRow = 9837
ActiveWindow.SmallScroll Down:=141
Range("A200").Select
Sheets("ARPWVoid_120805").Select
ActiveWindow.ScrollRow = 40
Range("A70:A71").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Range("A200").Select
Range("A1").Select
number of rows. The current recorded macro has a range of A1:A300 but
the value could change. Tomorrow I could have a range of A1:A50 or
A1:A550. I need to be able to accommodate a worksheet with any number
of rows.
Range("F1:L1").Select
Selection.AutoFill Destination:=Range("F1:L200")
Range("F1:L200").Select
Range("F1").Select
Columns("L:L").Select
Selection.Copy
Range("F33").Select
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Range("A1").Select
Rows("1:2").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Range("A1").Select
Sheets("ARPWVoid_120805").Select
Range("A1:A2").Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Range("A6").Select
ActiveWindow.ScrollRow = 9185
ActiveWindow.SmallScroll Down:=387
ActiveWindow.ScrollRow = 9837
ActiveWindow.SmallScroll Down:=141
Range("A200").Select
Sheets("ARPWVoid_120805").Select
ActiveWindow.ScrollRow = 40
Range("A70:A71").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Range("A200").Select
Range("A1").Select