+ Reply to Thread
Results 1 to 19 of 19

Lookup or Index & Match Maybe?

  1. #1
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Lookup or Index & Match Maybe?

    When I open the red cell on each bracket (i.e. C6), I want to select an “Open Table” from the drop down list.

    The VLOOKUP doesn’t work because it needs to look in an array (C6:I34) on each bracket, not just one column.

    We will be assigning tables in 2-3 different brackets simultaneously, so when Table 1 is selected in a cell one bracket, it should not show up on the drop down list when we call a table anywhere else on that same bracket or any other bracket…..UNTIL the match is over.

    So when you double click on A5 or A7 for example, I need it to copy that value to D6, AND it also should add that table back to the “Open Tables” list. Same for A9 & A11 copy to D10, etc.

    I feel like I’m close to making this work but I cannot get over this hump. Any help would be appreciated!!
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    Here you go. To have a separate "diminishing list" for each Bracket (sheet), you really need a separate set of source data. I've added a second set and named them Table1 and Table2.

    I've also changed the formulas on that sheet to ones that cause numbers to disappear in the first column and the list to "shorten" in the right column. This will eliminate all the untidy "spaces" your other method was causing in the drop downs themselves.

    Also, I've redone the Table1 and Table2 name definitions so they are dynamic. You won't have blank spaces at the END of the drop down either, it will always show only the numbers visible in the second column for each bracket.


    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    Thank you for the help! The diminishing list works great on the 1st bracket, but not on the 2nd bracket.

    We will be running BOTH brackets (and maybe 1 or 2 more) at the same time, so when I go to select a table in bracket 2, it should not show the tables in use on bracket 1.

  4. #4
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    Aso still needing help with this part:

    So when you double click on A5 or A7 for example, I need it to copy that value to D6, AND it also should add that table back to the “Open Tables” list. Same for A9 & A11 copy to D10, etc.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Lookup or Index & Match Maybe?

    Hi JoeJaycee,

    Jerry really gave you a lot of excellent code to work with and you only need to change this one bit to get your bracket2 problem sorted out.

    In the Name Manager change this line for Tables2:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    @JBeaucaire,

    Thank you for helping out here. You work, is as always, absolutely outstanding!
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Lookup or Index & Match Maybe?

    Re:
    So when you double click on A5 or A7 for example, I need it to copy that value to D6

    You could enter a formula in D6 to Show what is in A5 or A7. Since you have different values in A5 and A7,we won't know which one you would prefer to show in D6.

    Maybe you could consider A5 to show in D6, A7 in D7, A9 in D10 and A11 in D11.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    Ok, so BOTH sheets will use the same "pool" of tables in each round? Since each round means the same tables would be used again, I created a separate "pool" of tables for each round. Currently, each round has 40 tables, you can shorten each group to just the number of tables MAX needed for each round to keep the dropdowns tidy.

    I've also added a "diminishing drop down" for your teams, too. As you add Teams to the TEAM sheet, the "TABLE" sheet will grab those new ones as well.

    Lastly, I've added the "double-click" event for you. Any sheet that has the name "*Bracket*" then the macro in the Thisworkbook module will trigger a movement based on which cell you double-click on. I've also added a RESET button to those sheets.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    I'm sorry, but this is still not retuning what I need on bracket 2.

    Currently both brackets offer the correct diminishing list for that respective bracket. However, if table 1 is in use on bracket 1, then it should NOT show up on the list of available tables in bracket 2. Both brackets will be running at the same time.

    Thanks so much for your continued help!!!

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    You need a group of tables 1-40 for round32 on Bracket1, then ANOTHER group of tables 1-40 for round32 on bracket2?

    Just add another set of columns like we did for table1, then name that Table2 and use Table2 on Bracket2. Simply stated, you need to create a diminishing table with a unique name that you can use for each "unique" requirement.

  10. #10
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    Hi, JBeaucaire

    Jerry, first I really want to thank you for all of your extensive assistance in helping me solve this problem. I’m not very experienced here, but I understand a lot of what you have coded. But it’s pretty complex.

    I still don’t think I’m explaining the table assignment problem clear enough. Bear with me as I try to explain again in a different way:

    When I open ANY red cell in ANY round in ANY bracket, the drop down list should only show which tables from the “pool” of 40 tables are not currently in use. Matches will be underway at the same time in numerous different “rounds” in several different brackets. So…If table 4 is assigned in a Round of 16 match in Bracket_1, then table 4 should NOT appear as an available table in any other red cell on any other bracket.

    Finally, when that Round of 16 match is done in Bracket_1 and I double-click to advance the winner to the next round, that should automatically add table 4 back to the list of available tables.

    Thank you again for your contributions so far. I would appreciate your continued help! Thank you!

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    1) Single set of tables used on both sheets.
    2) Table list diminishes as tables are chosen
    3) Team Names in column A diminish as team names are chosen
    4) Double-clicking a team name cell will transfer winner to next round and clear the used table
    5) Reset button to start anew
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    Thank you so much, that is what I was looking for! When double-clicking the team name cell it transfers the winner to next round and clears the used table. Is there a way to add that table back to the "pool" of open tables without erasing it from the red cell? Or maybe copy and paste the value into a neighboring cell? I want to be able to see what tables the teams have already played on.

    Also, when selecting a table in the drop down list, can it automatically print a sheet that shows the match (i.e. Team 1 & Players vs. Team2 & Players on table 7)?

    Thanks again for all of your help with this project!

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    Joe, am I helping or just doing it all? This thread has strayed far from it's post #1 question, and each post is you ordering new features added. The forum isn't, at it's best, just meant to be "get coding done for free here". This is hopefully meant to be a learning process for you. If you're really just looking to get an entire project done for you, perhaps a paid consultant is a more honest approach.

    So, open the workbook, start reading through the code and doing some homework. you need to understand what you have so far if you're going to be able to add to it and/or tweak the existing features if you start moving things around. You should at least be trying to do some of this and/or learn from this.

    [END SPEECH MODE]

    Try turning on the macro recorder and let it record you doing something specific you want to add, something you can see in the recorded code for what it is. Then try to add that to the existing code. The code that is doing things automatically is in the ThisWorkbook module. The reset code is in Module1.
    Last edited by JBeaucaire; 03-21-2012 at 03:03 PM.

  14. #14
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    @JBeaucaire

    I can't thank you enough for all of your help! I kinda felt like I was pushing my luck, and I am truely sorry about that but this thing has been so much harder than I ever expected. When I was asked to help do this benefit, I thought I could do this, but it's been difficult to learn.

    Thanks again for your expertise!!

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    Ok, for charity, huh? (chuckle)

    In the ThisWorkbook module, add this line:
    Please Login or Register  to view this content.
    If you want to mockup this sheet in your workbook to "printout", I can make that sheet print when you select table numbers.

  16. #16
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    Thank you! The printout would look like this:

    "Round"

    "Team1"
    "Team 1 Players Names"

    vs.

    "Team2"
    "Team2 Players Names"

    on table "Table#"

    "timestamp"


    FYI - I recorded the macro to do the copy/paste as you suggested and then used the code to modify the workbook code you wrote. I added a new string "History" and copied what you showed me on "TableStr" and tehn added the copy/paste code right before your code that advanced them. Mine worked just fine, but you just showed me how to do the same thing with one line. So know I understand the Offset command much better. THANK YOU!

  17. #17
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    This sheet to print needs to be in your workbook. So go ahead and mockup your sheet there and post it.

  18. #18
    Registered User
    Join Date
    03-15-2012
    Location
    Jefferson City, Missouri
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Lookup or Index & Match Maybe?

    Okay, I added a new sheet "Printout". I believe this is what you were asking. Thank you!
    Attached Files Attached Files

  19. #19
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Lookup or Index & Match Maybe?

    I had to fix an issue with the "moving the old table" because the cell we moved down to was STILL in the "count range" we were using to determine if the table was available or not. So I created a new spot in column L to indicate the prior tables used, they match row for row.

    Be sure you have filled in BOTH team names before you select a table because it won't check before it prints automatically. Lots more "Offset" functions in the new macro in ThisWorkbook that is handling the auto-printing.
    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