+ Reply to Thread
Results 1 to 11 of 11

vlookup and my league table

  1. #1
    Registered User
    Join Date
    10-14-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    4

    vlookup and my league table

    I recently decided to try my hand at something new with Excel. Given that I tend to organise quite a few video game tournaments of one kind or another, it seemed natural to try and set a league table up with Excel 2013.

    I have managed pretty much to do it but I am struggling with the final piece of the puzzle in my soccer league table after filling in some random national team names and some random results.

    My spreadsheet has 3 separate worksheets.

    One is a Fixtures/Results sheet where it contains (surprise!) the matches to be played and scores of completed matches.
    A Dummy Table sheet which pulls the data from the fixtures table and calculates the rankings for the teams.
    And finally the standings table which pulls the data from the Dummy Table so that we can have a nice and easy to read ranked table.

    I have managed to get the Standings table to fill in the name of the team for the appropriate rank easily enough. My issue arises when trying to use vlookup to fill in the details (games played, win, penalty wins etx)

    I know Im missing something REALLY obvious here but no matter what I do I get stuck with NA.

    Still I'm rather proud of what ive managed to do. Its not bad for someone who only ever used the SUM command before!

    Attached is the sheet in question!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,812

    Re: vlookup and my league table

    Try this in Standings C4:

    =VLOOKUP($B4,DummyTable!$B$4:$Z$51,2,FALSE)

    The first column in the lookup array needs to be the one containing the lookup value, otherwise it can't match anything.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    10-12-2017
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    59

    Re: vlookup and my league table

    Good Morning.
    See the attachment if I understand your purpose.
    Good luck.
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,812

    Re: vlookup and my league table

    Sorry for off-topic interjection:

    Gfranco - although there is no official rule regarding this behaviour, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!

  5. #5
    Registered User
    Join Date
    10-14-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    4

    Re: vlookup and my league table

    Thanks guys for your help so far!

    AliGW, I have a slight issue with the formula you provided. It seems after I drag the formula down to fill the rest of the "games played" column it breaks down and I have no idea why. Attached is what happens.

    grfanco, thanks for that. It'll work perfectly but if you (or anyone else) can explain what exactly is going on there in the standings table in grfranco's version of the sheet that would be HUGELY appreciated.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-12-2017
    Location
    Brazil
    MS-Off Ver
    2016
    Posts
    59

    Re: vlookup and my league table

    Good night, Trumane.
    I used the index function together with the match function.
    The index function returns an item from a list based on a given line number. As we do not know what this line number is, I used the match function that returns the line number of an item within a range.
    For your worksheet, the match function returned the line number that each item in the Team column of the Standings spreadsheet occupied in the DummyTable worksheet.
    With this number, it was possible to return each item from the All Games Home Games and Away Games columns from the DummyTable worksheet to the Standings spreadsheet.
    Admittedly, AliGW's suggestion to use the vlookup function is completely correct (just a column variation adjustment) as you can see in the attachment I'm going through.
    I hope I have clarified and apologize for any inconsistency in the sentences (guilty of the google translator)
    Good luck.
    GFranco.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-14-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    4

    Re: vlookup and my league table

    Thanks! That pretty well wraps things up on my end.

    The only thing to work out now is why I have 2 Korea Republics in my Standings sheet

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,812

    Re: vlookup and my league table

    Quote Originally Posted by Trumane View Post
    AliGW, I have a slight issue with the formula you provided. It seems after I drag the formula down to fill the rest of the "games played" column it breaks down and I have no idea why.
    Sorry - should be this:

    =VLOOKUP($B4,DummyTable!$B$4:$Z$51,2,FALSE)

    The only thing to work out now is why I have 2 Korea Republics in my Standings sheet
    Attach your latest version so that we can troubleshoot it.

  9. #9
    Registered User
    Join Date
    10-14-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    4

    Re: vlookup and my league table

    Thanks AliGW for your updated fix. Delighted to report that it works!

    The issue with the ranking of teams (i.e. my 2 Korea Republics) is most likely to be found from DummyTable!AA to AF. What I am TRYING to do is first rank teams by points scored, then goal difference, then total goals scored, then away goals scored and finally by alphabetical order (ie if Australia and Russia were tied even after considering away goals, Australia would be ranked above Russia)
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,812

    Re: vlookup and my league table

    What you are asking for now is completely different to the way that the thread started. Ranking in this way is a much more complex thing, and I would urge you to change the title of your opening post in this thread to reflect what you are actually looking for help with.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: vlookup and my league table

    After a quick look... The country list in Dummy Table seems to have been manually typed (not as a result of a formula). Argentina is missing from the list and Korea is there twice. So replace the list with th correct one...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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. League Table
    By Swish26 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2015, 09:27 AM
  2. League Table
    By daznav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2010, 03:53 AM
  3. League table help
    By irons182 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-30-2010, 10:57 AM
  4. League Table
    By Maffew in forum Excel General
    Replies: 6
    Last Post: 11-05-2009, 08:43 AM
  5. create league table :: enter result :: update table
    By Eng.Soly in forum Excel General
    Replies: 2
    Last Post: 12-27-2008, 06:31 AM
  6. Sorting Data Table (league table)
    By Cul in forum Excel General
    Replies: 2
    Last Post: 09-13-2007, 05:32 AM
  7. League Table
    By da_big_k in forum Excel General
    Replies: 1
    Last Post: 01-17-2006, 01: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