#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Autofill

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoFill A to Z Hardeep kanwar New Users to Excel 4 March 29th 09 07:59 AM
Autofill Until uberathlete Excel Discussion (Misc queries) 1 November 10th 05 04:08 PM
Autofill until uberathlete Excel Discussion (Misc queries) 1 November 9th 05 06:01 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Autofill last row? Ron de Bruin Excel Programming 7 September 16th 03 05:37 PM


All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"