![]() |
|
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Apr 2002
Posts: 52
|
I am trying to create a macro where i copy a name from sheet a and paste in sheet b. The problem comes when I paste the second name. My macro will paste it over the original name and I need it to move to the next cell-creating a list essentially. Help!!
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Posts: 2,318
|
try this;
Sub Macro1() ' ActiveCell.Copy ActiveSheet.Next.Select Do Until ActiveCell = Empty If ActiveCell = Empty Then ActiveSheet.Paste ActiveCell.Offset(1, 0).Range("A1").Activate 'moves the cell down one Else ActiveCell.Offset(1, 0).Range("A1").Activate End If Loop ActiveSheet.Paste End Sub |
|
|
|
|
|
#3 |
|
Join Date: Apr 2002
Posts: 52
|
jimboy,
thanks-works perfectly. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|