Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Selection.AutoFill Destination:=Range("C2:C" & row)
I think the above should be: Selection.AutoFill Destination:=Range("C1:C" & row) -----Original Message----- Howcome my autofill code does not work? Any help is appriciated! Private Sub FilePrep_Click() Dim row As Integer row = 2 Do While Not Range("B" & row) = "" row = row + 1 Loop row = row - 1 Columns("C:C").Select Selection.Insert Shift:=xlToRight Range("C1").Select ActiveCell.FormulaR1C1 = "=RC[-2]&"";""&RC[-1]" Columns("C:C").EntireColumn.AutoFit Range("C1").Select Selection.AutoFill Destination:=Range("C2:C" & row) Range("C1:C" & row).Select Columns("C:C").Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Columns("A:B").Select Application.CutCopyMode = False Selection.Delete Shift:=xlToLeft Range("A8").Select End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
AutoFill A to Z | New Users to Excel | |||
Autofill Until | Excel Discussion (Misc queries) | |||
Autofill until | Excel Discussion (Misc queries) | |||
Autofill: Need to autofill one week block, (5) weekday only into cells. | Excel Discussion (Misc queries) | |||
Autofill last row? | Excel Programming |