+ Reply to Thread
Results 1 to 5 of 5

Get 1 line from multiple records

  1. #1
    Registered User
    Join Date
    02-21-2009
    Location
    Kingston, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Get 1 line from multiple records

    Hello...I have hundreds of excel records, all from 1 template I made, so columns are all the same, and I would like to grab 1 specific row from each record and put onto new sheet, for the pupose of being able to sort, etc. The records are baseball stats procduced from a game I play, so any similarity to MLB ends at the name of the players, stats are not actual...So, here is what I have in a shortened version:

    Columns: Name Year Team Ave AB's Runs Hits Etc
    Totals XX XX XX XX XX XX XX XX
    XX XX XX XX XX XX XX
    XX XX XX XX XX XX XX

    Ok, now imagine I have hundreds of these sheets, the Totals row, Line 2, on the sheets, is the row I want to grab from each player. (I have the sheets so that the numbers add upward to the totals). Basically when finished I want to get rid of the Year and Team column as these are not needed. So the finished project should read as follows:

    Columns Name Ave AB's Runs Hits Etc
    Totals AA XX XX XX XX XX
    BB XX XX XX XX XX
    CC XX XX XX XX XX

    Ok, how do I go about accomplishing this, or do I just have false hopes? I am not a programmer, but was thinking writinig a macro would help, but not sure. Any pointers or solutions would be greatly appreciated.

    Thanks

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Get 1 line from multiple records

    is that sheets in same workbook or different work books ?
    if in same workbook
    Please Login or Register  to view this content.
    adapted from one of tom ogilvys at all experts .com
    http://en.allexperts.com/q/Excel-105...e-sheets-1.htm
    Last edited by martindwilson; 02-21-2009 at 07:04 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-21-2009
    Location
    Kingston, Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Get 1 line from multiple records

    Same file folder, different workbooks

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Get 1 line from multiple records

    blast! and bother
    ok here's another one
    copy all workbooks in to a new folder create a new one and save it in the same folder (this will preserve originals if something goes badly wrong.unlikely but you never know )
    stick this code into a new module in the new workbook
    i tried it on 4 workbooks with 4 sheets in each and it seems ok
    Please Login or Register  to view this content.
    this is a modified one originally by Bob Umlas at allexperts .com
    Last edited by martindwilson; 02-21-2009 at 08:25 PM.

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

    Re: Get 1 line from multiple records

    Hi

    Put the attached file in the same folder as the summary files, and run the macro. See how it goes.


    rylo
    Attached Files Attached Files

+ 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