+ Reply to Thread
Results 1 to 8 of 8

variable lookup and select 4

  1. #1
    Registered User
    Join Date
    11-25-2010
    Location
    North Pole, Alaska
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question variable lookup and select 4

    I have searched Google to the ends of the net and have not found anything close to a solution for this. Perhaps someone here can point me in the right direction.

    OK, I have several rows with a radio button in the first column, when selected, the linked field displays a number.

    On the columns, above the header, is a checkbox.

    The plan of operation is this:

    The user clicks a row indicating a player, then selects up to 4 checkboxes at the top for export to a stats screen.

    I got the row working, and got the first checkbox to display the selected statistic, but the second stat line still only shows the first checkbox selected.

    Example time (hopefully):
    | A | B | C | D | E
    1 | | [] | [] | [] | []
    2 | O | plr1 | 1 | .2 | 15
    3 | O | plr2 | 2 | .35 | 12
    4 | O | plr3 | 3 | .1 | 17
    5 | O | plr4 | 4 | .275 | 5
    6 | O | plr5 | 5 | .4 | 10

    A B
    10 Name
    11 Stat1
    12 Stat2
    13 Stat3

    There are actually 14 stats that could be selected, but this shoudl be enough.

    When a row is selected via the radio button, eg row 3, then A1 will display 2. I use this with a INDIRECT function INDIRECT("B"&A1) which will display plr2 in B10.

    When a column checkbox is selected, say C, which is bound to C1 as True/False, then B11 is determined by IF(C1=TRUE, INDIRECT("C"&A1),"") which in our case would be "2"

    Still with me? I hope so, I NEED you!

    If B1 is checked, I need THAT to take over stat1, and Stat2 to reflect the selected C1 stat. Instead, both stat1 and 2 will display B1's stats.

    Now to be able to do this for up to 4 stats!

    Anyone able to assist me? Or better yet, point me in a better direction to solving this problem?

    Thanks for the time and assistance.

    Jon
    Last edited by akscooter; 12-01-2010 at 01:10 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: variable lookup and select 4

    To best describe or illustrate your problem you would be better off attaching a dummy workbook.
    The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook
    so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: variable lookup and select 4

    On re-reading the post I suspect we can do this without a sample (though it would help for clarity)

    Please Login or Register  to view this content.
    note the point re: Array entry in B11 etc...

  4. #4
    Registered User
    Join Date
    11-25-2010
    Location
    North Pole, Alaska
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: variable lookup and select 4

    Sorry for not getting back with you sooner, just got back from a trip. I'm attaching my spreadsheet for you to examine.

    On the sheet labeled Ice Dogs, you'll see data (which is refreshed from the web). You'll see the radio buttons on the left, in Column B which are bound to A5.

    Row 4 has the check boxes, which are bound one row above themselves for True/False. On Row 2 is test that I'm collecting the proper data.

    Over to the right in V4 through W10 is the data preview.

    W7 through W10 are the stats selected when the check boxes are checked. Up to 4 stats will be displayed, if I can get this to work.

    I'll play with the code you have provided and see if I can make it work.

    Thanks
    Jon
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: variable lookup and select 4

    Using the specifics of your sample - the prior formulae - updated - would be:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-25-2010
    Location
    North Pole, Alaska
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: variable lookup and select 4

    Thanks, I'll play with that.

    Just out of curiosity, I was attempting an angle that I thought might work at first, but now I'm not so sure.

    I was going to put a formula in S3 that would test each of the true/false and add to an array. Something like this:

    =IF(E3=TRUE,"E"),IF(F3=TRUE,"F"),IF(G3=TRUE,"G"), etc

    which, if E3 and G3 were true, an array would be produced array(E,G) from which, my stats fields could simply look for the stat which they are responsible for. So stat one would pull the E, and stat 2 would pull the G. Using the INDIRECT function, I could combine these with A5 to make a reference such as G15.

    Is this a wrong approach?

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: variable lookup and select 4

    INDIRECT is Volatile and in this context unnecessary (as previously illustrated).

  8. #8
    Registered User
    Join Date
    11-25-2010
    Location
    North Pole, Alaska
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: variable lookup and select 4

    OK, got it. Thanks!

    Looks like your solution is working! I'll see what I can do to fit this in.

    Thanks again,
    Jon

+ 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