Consulting

Results 1 to 12 of 12

Thread: Solved: Duplicating the cell above the current cell

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Oct 2010
    Location
    Upstate NY
    Posts
    6
    Location

    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
  •