Consulting

Results 1 to 4 of 4

Thread: Solved: select last 5 rows

  1. #1
    VBAX Contributor
    Joined
    Apr 2012
    Posts
    107
    Location

    Solved: select last 5 rows

    copy last 5 rows then to paste to A2 and finally to delete
    rows starting from row7th, plse write vba.
    Attached Images Attached Images

  2. #2
    VBAX Mentor
    Joined
    Jul 2012
    Posts
    398
    Location
    [VBA]Sub a()
    LR = Cells(Rows.Count, "A").End(xlUp).Row
    Range("A2:A" & LR - 5).EntireRow.Delete
    End Sub[/VBA]

  3. #3
    VBAX Contributor
    Joined
    Apr 2012
    Posts
    107
    Location
    Quote Originally Posted by patel
    [vba]Sub a()
    LR = Cells(Rows.Count, "A").End(xlUp).Row
    Range("A2:A" & LR - 5).EntireRow.Delete
    End Sub[/vba]

    sloved with thanks

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    To mark your thread solved simply click on the dropdown Thread Tools and select the correct option. I have done this for you this time
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •