Copy and paste macro

  • Thread starter Thread starter Bears
  • Start date Start date
B

Bears

I am trying to write a macro to copy the contents of the cell that the
cursor is in and paste it two columns over into all the cells that are
blank from that row and up until the next cell with something in it. I
just can't get the column offset correct- Help would be appreciated.
 
Hi
This should do it without the paste. Untested, so you will probably get
an error if target is on the first row and you want to go up again...

Application.Screenupdating = true
Set target = activecell.offset(0,2)
Do while target.value = ""
target.value = activecell.value
set target = target.offset(-1,0)
Loop
regards
Paul
 
Back
Top