+ Reply to Thread
Results 1 to 11 of 11

Looking up row numbers from a cross-reference chart

  1. #1
    Registered User
    Join Date
    06-27-2015
    Location
    NoVA
    MS-Off Ver
    Excel 2014
    Posts
    6

    Looking up row numbers from a cross-reference chart

    Hi Team,

    I consider myself fairly good with excel but this has me stumped. I currently have a spreadsheet with each NBA team in Row 1 and the teams they played, in order, below them. For each team, I need to know what numerical game that was for the opposing team via their row number.

    For example, you can see in the "F" column that those are the teams that Cleveland played in order. Cleveland's first game was against the NY Knicks; however, if you look in the "T" column for the NY Knicks' games, that game against Cleveland was their second game. So for all of each team's opponents, I need to know what game that was for that opponent which can be deduced from the row number.

    I'm currently doing it very manually. For example, if I'm doing Atlanta I replace all "atl" and "@ atl" with "=ROW()" and then conditionally format all numbers to highlight so I can easily see them. Then visually reference each Atlanta game with it's opponents highlighted row number. It's a pain and there has to be a formula somewhere to make it easier.

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Looking up row numbers from a cross-reference chart

    Hi, welcome to the forum

    wow, that is worksheet REALLY hard on the eyes.

    Can you show me what a sample answer would look like?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-27-2015
    Location
    NoVA
    MS-Off Ver
    Excel 2014
    Posts
    6

    Re: Looking up row numbers from a cross-reference chart

    Sorry about that; I was trying to fit all the teams without scrolling left or right. I can't show you because the thread won't let me attach any more spreadsheets. But let's say I'm determining Atlanta's opponents. I just Replace all "atl"s with =ROW() and it'll tell me which row the atl's are in across the spreadsheet. Then I do down Atlanta's opponents one-by-one and cross reference them visually. I insert a column next to Atlanta and type them in manually.

    I created a sports betting spreadsheet and obtaining this info is imperative to update the data correctly and determine a win rate above 52.4% (for all you sports bettors out there that is the break-even point for sports betting).

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Looking up row numbers from a cross-reference chart

    Still not sure what your outcome would look like...separate table?

    See if using Conditional Formatting will at least assist you to find the cells you need.

    I used AE1 to ernter a team
    1. highlight the range you want to apply the conditional formatting to
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =RIGHT(A2,3)=$AE$1 format Red (or whatever you want)

    This will highlight all Atl, for instance, and at least make it easier to see a specific team

    maybe if you show me a sample of what your outcome would look like?

  5. #5
    Registered User
    Join Date
    06-27-2015
    Location
    NoVA
    MS-Off Ver
    Excel 2014
    Posts
    6

    Re: Looking up row numbers from a cross-reference chart

    What I have looks like the attachment. I'm doing it for Golden State (gsw). I inserted a column (K) and am typing the row number of the next team Golden State played. When it's done I'll copy and paste all of those row numbers into my other spreadsheet where it will auto-update.
    Attached Files Attached Files

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Looking up row numbers from a cross-reference chart

    I presume that in AA2 - where you now have 2, that used to say Gsw?
    I think it would make things easier if you did not overwrite your actual data with anything - you will never be able to go back anc check anything. Consider using another table for the answers.

    Assuming you create another table, starting in AG1, with the exact same headings as in the A1 table, put this in AP2 and copy down. (I used AP2, because it matched the location of Gsw in the 1st table)
    =MATCH(AP$1,OFFSET($A$1,,MATCH(RIGHT($J2,3),$A$1:$AE$1,0)-1,COUNTA($A:$A),1),0)

    Provided your 1st table still contains the original data (i replaced a few numbers with Gsw), then this will pull out the row numbers for you.

    hmm OK to make this simple (even I had a hard time understanding what I just said lol)...
    1. copy across teh headings from A1:AE1 to AG1
    2. Put this in AG2, and copy down and across

  7. #7
    Registered User
    Join Date
    06-27-2015
    Location
    NoVA
    MS-Off Ver
    Excel 2014
    Posts
    6

    Re: Looking up row numbers from a cross-reference chart

    This formula was really close. I received a few #N/A that I can't figure out. Also, oftentimes teams play each other more than once, but the formula does not account for that. For example, GSW played the Lakers (lal) in their second game and also in their tenth game, but the formula stays with the first game, so it shows both games being the fifth for the Lakers.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Looking up row numbers from a cross-reference chart

    My apologies, I forgot to add the final formula for AG2....
    =MATCH(AG$1,OFFSET($A$1,,MATCH(RIGHT(A2,3),$A$1:$AE$1,0)-1,COUNTA($A:$A),1),0)

    I will see what I can do regarding the repeat games

  9. #9
    Registered User
    Join Date
    06-27-2015
    Location
    NoVA
    MS-Off Ver
    Excel 2014
    Posts
    6

    Re: Looking up row numbers from a cross-reference chart

    For some reason all of the spurs (sas), knicks (nyk), and pelicans (nor) games are coming up as #N/A.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Looking up row numbers from a cross-reference chart

    None of those appear in your headings

    You have Sac (column AA) or SA (column AB)?
    You have NY (column U)
    You have NO in column T

  11. #11
    Registered User
    Join Date
    06-27-2015
    Location
    NoVA
    MS-Off Ver
    Excel 2014
    Posts
    6

    Re: Looking up row numbers from a cross-reference chart

    Yep...should've noticed that in your formula. I changed the headings and the N/As are gone. Now if you could find a way to take the next iteration of the game played with the same team all will be well in the world. Well, my world at least

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Cross Reference Numbers Help
    By Jeff73 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2014, 01:33 PM
  2. How to cross reference two columns of numbers
    By Danexcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2010, 09:52 AM
  3. Cross-reference Date with Numbers
    By mckoy_1 in forum Excel General
    Replies: 7
    Last Post: 07-31-2007, 04:11 PM
  4. Cross Reference Part Numbers
    By Chuck N in forum Excel General
    Replies: 5
    Last Post: 09-18-2006, 08:53 PM
  5. Replies: 2
    Last Post: 05-22-2006, 02:45 PM

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