FillDown

  • Thread starter Thread starter Mike Fogleman
  • Start date Start date
M

Mike Fogleman

What is happening with this code to FillDown a formula in one column to a
point where another column ends?

Range("E1").Formula = MyFormula
Range("E1", Range("A1").End(xlDown)).Offset(0, 1).FillDown

Any data that may be in columns B:D are all changed to whatever is on row 1
of the column. Only column A will always be a complete list so that needs to
be criteria for filling down. The code works great if the FillDown column is
next to column A, but not if it points across other columns of data. How can
I do this without re-arranging my data columns?
 
Sub tester1()
myFormula = "=sum(A1:D1)"
Range("E1").Formula = myFormula
Range("E1", Range("A1").End(xlDown).Offset(0, 4)).FillDown

End Sub

Will filldown column E.
 
Back
Top