View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Berglund Jim Berglund is offline
external usenet poster
 
Posts: 41
Default AutoFill difficulty

I'm getting an Error 1004 on the highlighted line of the following code.

With ActiveSheet
.Range("DG5").Select
numberofRows = ActiveCell.CurrentRegion.Rows.Count

.Range("DG5").Value = "=VLOOKUP($DH5,$N$3:$AP$9000,29,TRUE)"
Set SourceRange = .Range("DH5")
Set fillRange = .Range(Cells(6, 111), Cells((numberofRows - 5), 111))
SourceRange.AutoFill Destination:=fillRange
End With

Could you please help me with this? Thanks