+ Reply to Thread
Results 1 to 4 of 4

Isolating last line from a group. VBA?

  1. #1
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178

    Isolating last line from a group. VBA?

    I use sort then subtotal and I get a great list of the sorted fields seperated by a "total " line. But how do I isolate the line before the "Total for..." line.
    I can do it by an "=if(f10=0,0,1) then sorting by the new column, but its tedius and not automatable.

    Example:

    a 1/12/08
    a 1/15/08
    a 2/10/08
    total for a 3
    b 1/13/08
    b 2/14/08
    total for b 2
    ...


    I would like to cut this to:
    a 2/10/08
    b 2/14/08


    Is there another solution to this issue? maybe VBA?

  2. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    Please Login or Register  to view this content.
    ought to work
    If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Not sure I follow.

    Do you really want to extract a list of the largest dates for each of the grouping items and place them somewhere else?

    Or do you really want to delete all the rows except for the largest date in each group???


    rylo

  4. #4
    Forum Contributor
    Join Date
    07-25-2008
    Location
    texas
    Posts
    178
    Rylo,
    I just want to remove all the lines except the one with the latest date from each group.

    Colofnature,
    I will try it, thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1