Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AutoFill not working

Status
Not open for further replies.

LGMan

MIS
Aug 27, 2003
233
GB
Hi,
I'm a bit lost, I have a piece of code that worked, then will not work the next time. No Columns have changed
I'm just trying to concatenate 2 columns and then copy this format to the bottom of the range.

Range("J1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(RC[-2],"" "",RC[-1])"
Selection.AutoFill Destination:=Range(Selection, ActiveCell.SpecialCells(xlLastCell))

Any ideas?
Thanks In Advance
 
Hi,

You have not defined the Destination range...
Code:
With Range("J1")
    .FormulaR1C1 = "=CONCATENATE(RC[-2],"" "",RC[-1])"
    .AutoFill Destination:=Range(.Offset(0), .Offset(0, -1).End(xlDown).Offset(0, 1))
End With

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top