View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Renaud Bill Renaud is offline
external usenet poster
 
Posts: 417
Default Referencing worksheet

Something like:

With Worksheets("Sheet1")
.Range("f2", .Range("a2").End(xlDown)).Offset(0, 5).FillDown
End with

Make sure you put periods in front of all Range and Cell properties, as
shown above.

I normally do a little more work programming, and use object variables, to
make single-stepping (and therefore debugging) easier (untested):

Dim wsSheet1 as Worksheet
Dim rngA2Data as Range
Dim rngFillRange as Range

Set wsSheet1 = Worksheets("Sheet1")
With wsSheet1
Set rngA2Data = .Range("A2").End(xlDown)
Set rngFillRange = .Range("F2").Resize(rngA2Data.Rows.Count)
End With

rngFillRange.FillDown

FYI: You might check out some of the Excel MVP web sites for more help.
http://www.mvps.org/links.html#Excel
--
Regards,
Bill Renaud