View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
J.W. Aldridge J.W. Aldridge is offline
external usenet poster
 
Posts: 425
Default fill down and across range

Set rngFormula = .Range("ag2")

Need to fill range across as well as down.
Tried changing the range from ("ag2:at2") but didn't work.

Entire code portion as follows:

With ThisWorkbook.Worksheets("ERRORs")
Set rngData = .Range("b2:b" & .Cells(.Rows.Count,
"b").End(xlUp).Row)
Set rngFormula = .Range("ag2")
rngFormula.aUTOFILL _
Destination:=.Range(rngFormula, _
.Cells(rngData.Rows(rngData.Rows.Count).Row,
rngFormula.Column))
End With