copy / paste values for certain range

  • Thread starter Thread starter Eric Dreshfield
  • Start date Start date
E

Eric Dreshfield

I am trying to get a macro to work that will take what is
in cell D2 and copy it (as paste-special values) into the
rest of column D provided there is data in column E. In
other words, if the data in column E gos down to row 227 I
would like the value in D2 to be in D3 through D227 as
well. The only catch is the number of rows will vary each
time the macro gets run. I can not use the autofill since
that increments the value of D2 once for each row it
pastes to. Any ideas ?

Thanks !
 
try this:

Sub fillDifE()
x = Range("e" & Rows.Count).End(xlUp).Row
Range("d2:d" & x).FillDown
End Sub
 
Back
Top