+ Reply to Thread
Results 1 to 8 of 8

Using a list box to perform lookups on a table

Hybrid View

  1. #1
    Registered User
    Join Date
    07-10-2010
    Location
    Birmingham England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Using a list box to perform lookups on a table

    In archery there are a number of different rounds shot (about 60).

    A particular score on a round results in a handicap rating.

    I have been trying to enter the score and the round shot (from a list box) and use a VLOOKUP to establish the handicap from a table.

    I can't figure out how to do it! How to make the table array a variable which can change according to the selection in the list box

    I have achieved the result I need in other ways on a small scale by having large nested IF statements based on the round name but there is a point when the formula gets too big.

    Can anyone help? Or can anyone come up with a macro to do it?

    I have attached a very simple example.

    Thanks
    Attached Files Attached Files
    Last edited by davidwp; 07-13-2010 at 09:37 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using a list box to perform lookups on a table

    Perhaps
    In B12
    =IF(C4="Round A",LOOKUP(B4,E3:E7,H3:H7),IF(C4="Round B",LOOKUP(B4,F3:F7,H3:H7),LOOKUP(B4,G3:G7,H3:H7)))

    I've taken out the listbox and added a validation list to C4.
    Select from the drop-down in C4 to see the result in B12

    Hope this helps
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    07-10-2010
    Location
    Birmingham England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Using a list box to perform lookups on a table

    Thanks Marco.

    What you propose works - which is good.

    The only issue I have is that there are in excess of 60 different archery rounds so this would become a rather large formula. In addition I didn't mention, because the principle will be the same that each handicap rating for each round derives an "allowance" which will involve another similar formula, and yet more a classification rating which will require a third.

    There has to be a more elegant solution but I can't get anything to work.

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Using a list box to perform lookups on a table

    >>There has to be a more elegant solution but I can't get anything to work

    Try this elegant solution:

    =INDEX(H3:H7,MATCH(B4,INDEX($E$3:$G$7,,MATCH(C4,E2:G2,))))

    Adjust to suit

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using a list box to perform lookups on a table

    My apologies for the rather rustic approach to the part of the problem you chose to reveal.

  6. #6
    Registered User
    Join Date
    07-10-2010
    Location
    Birmingham England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Using a list box to perform lookups on a table

    Marco

    Ooops. Sorry if I sounded ungrateful I really wasn't. I should have explained the problem better but I didn't want to get bogged down in the detail and the huge tables involved.

    No excuse but I had got to the stage where I couldn't see the wood for the trees at the end of a long day. I value the efforts of you and others to help.

    Thanks again

    David

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using a list box to perform lookups on a table

    If you put together a complete list of your handycap system and the allowances, then perhaps we can reduce the size of this table and then provide a more comprehensive solution.

    Cheers.

  8. #8
    Registered User
    Join Date
    07-10-2010
    Location
    Birmingham England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Using a list box to perform lookups on a table

    Teethless Mama your solution worked perfectly for me.

    I have now done the first part of what I needed to do. From now on I am going to be a big fan of the INDEX function and the MATCH FUNCTION.

    I'm going to take a break and try to really understand and work with the spreadsheet, then I'm going to import the next couple of tables that I need to lookup data from.

    I may need help again!

    Thank you very much.

    David

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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