Copy down macro

  • Thread starter Thread starter JamesA
  • Start date Start date
J

JamesA

I want to copy data down a column in a ws until it finds
an existing entry in the same column. It should the copy
that entry down same column until it finds the next
entry ...
Would someone please help me with a macros or vb fo this
task. I would be very grateful.

JA
 
With Activesheet
set rng1 = Intersect(.Columns(1)EntireColumn,.UsedRange)
End with
set rng2 = rng1.specialcells(xlBlanks)
rng2.Formula = "=" & rng2(0).offset(-1,0).Address(0,0)
set rng3 = Activesheet.Range(rng2(1),rng1(rng1.count))
rng3.Formula = rng3.Value

Assumes there are no formulas in the column.
 
Back
Top