Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As always, post YOUR code for comments
-- Don Guillett SalesAid Software "Bears" wrote in message oups.com... 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 Bears wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming | |||
MACRO TO COPY AND PASTE! | Excel Programming |