Copy down macro

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
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top