Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 -- bhussey ------------------------------------------------------------------------ bhussey's Profile: http://www.excelforum.com/member.php...o&userid=31244 View this thread: http://www.excelforum.com/showthread...hreadid=543115 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Defining Ranges | Excel Worksheet Functions | |||
Automatically Defining Ranges | Excel Programming | |||
Automatically Defining Ranges | Excel Programming | |||
Re-defining Ranges in VBA | Excel Programming | |||
Defining Ranges | Excel Programming |