-
Solved: Duplicating the cell above the current cell
Brand new to Excel VBA, used Quattro Pro for years
Question : trying to duplicate the cell above the active cell down through a column until reaching a '999' stop ... the following isn't working for me :
[vba]Dim PSRegCell
For Each PSRegCell In Range("A1")
If ActiveCell.Value <> 999 Then
ActiveCell.Offset(-1, 0).Range("a1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Else: End
End If
Next PSRegCell[/vba]
I know this is simple, but I've been handed a project for which I'm unprepared ... thanks !
Last edited by Aussiebear; 10-05-2010 at 03:09 PM.
Reason: added VBA Tags to code
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules