+ Reply to Thread
Results 1 to 28 of 28

Custom viewing/sorting/filtering

Hybrid View

b0x Custom... 03-10-2008, 11:57 AM
NBVC It would help us if you... 03-10-2008, 12:02 PM
b0x Ok, I added some sample... 03-10-2008, 01:07 PM
NBVC See attached example: I... 03-10-2008, 02:16 PM
b0x Very cool man, thanks. That... 03-10-2008, 02:37 PM
  1. #1
    Registered User
    Join Date
    03-10-2008
    Posts
    20

    Question Custom viewing/sorting/filtering

    I really couldnt get a decent title that said what I wanted, so I was just vague.

    I am working with a spreadsheet that lists every single player season in major league baseball. For example, someone who played every year from 1920 to 1929 will have 10 entries in the file, one for each season.

    I want view every player season from year X forward, but they had to play in year X. Basically I want to look at every player's career from year X forward, but if your career started after year X, I am not interested.

    Hopefully you understand what I mean... Any ideas?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    It would help us if you supplied a sample zipped spreadsheet to see your setup.

    And give an example of what you want as a result.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-10-2008
    Posts
    20
    Ok, I added some sample data... the full file contains over 40k rows, so I cut it down some.

    On the full file, I used auto-filters, and then filtered season to be 1930 <= season < 1951. The plan was to go through and manually delete any player who didnt have a 1930 season (delete every entry for that player), but I know there is a better way.

    So, right now, every player season from 1930 to 1950 is listed, regardless of what year they first show up in the database. I want to only display players who have a season in 1930, and then display all of their seasons from 1930 forward. If the first season in the 1930-1950 range for a given player is NOT 1930, I don't want them to be displayed.

    Did that help?
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See attached example:

    I used a helper column to determine if players' starting year was the input year. (I created an input cell where you can enter the start year of interest).

    So you enter the year in the input cell (e.g. in cell U1) and then the formula in the helper column lists TRUE's for all players who started in that year.

    Then you filter that column (Column S) by TRUE....

    Formula used in S2:

    =MIN(IF($B$2:$B$603&$C$2:$C$603=B6&C6,$A$2:$A$603))=$U$1
    which is confirmed with CTRL+SHIFT+ENTER not just ENTER. It is an array formula.
    Attached Files Attached Files
    Last edited by NBVC; 03-10-2008 at 02:20 PM.

  5. #5
    Registered User
    Join Date
    03-10-2008
    Posts
    20
    Very cool man, thanks. That badboy takes some time to do it's thing on 40k records though

    Now, will that only work if I have the min year filtered beforehand?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by b0x
    Very cool man, thanks. That badboy takes some time to do it's thing on 40k records though
    Unfortunately, that's a drawback of most array formulas...the more records to scan the longer it takes... Not sure if it will help much but you can create another helper column that concatenates first and last names, then you can base the array formula on that column and see how it works.

    e.g. Insert a column between R and S and use formula =B2&C2 copied down.

    Then alter the formula in what's now T2 to:

    =MIN(IF($S$2:$S$603=S2,$A$2:$A$603))=$V$1

    Where V1 now contains the input year.....

    remember to confirm with CTRL+SHIFT+ENTER and copy down.

    Hope that improves the speed a bit.....

    Now, will that only work if I have the min year filtered beforehand?
    No, but you will have to refilter after you change the year in the input field.

    You can perhaps automate that with an event macro.

+ 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