Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jul 2006
    Thanked 0 Times in 0 Posts

    Find last entry (2003 SP2)

    I have an Excel spreadsheet created from an Access export. I can't ask the Access programmer to do too much more, so if feasible I'd like to create a macro to find and select specific data from the Excel sheet. The output has some rows of header, data starting on Row 16, and continuing for a variable number of rows. Three rows below the last of the variable data, the programmer has included a totals row (actually she exported the totals from the Access data, so there's no formula, just another row of numbers).

    I am thinking that I need a way to retrieve the location of the last entry in Column P, back up three rows, and select from A16 to P## , then copy that to the clipboard.

    My previous efforts on this all involved starting from previously named ranges, but this Access output won't have any.

    Hope this makes sense,


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Find last entry (2003 SP2)

    You can use something like this:

    Dim lngRow As Long
    lngRow = Cells(Rows.Count, "P").End(xlUp).Row - 3
    Range("A16:P" & lngRow).Copy

Posting Permissions

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