+ Reply to Thread
Results 1 to 8 of 8

Multiple checkoxes

Hybrid View

  1. #1
    Registered User
    Join Date
    04-22-2009
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    68

    Multiple checkoxes

    Hi,

    I have an excel sheet in which Column B has a list and Column C has corresponding items. Column D has the checkboxes.

    Please see the attachment.

    The user selects Category B from column B , and then selects item 2 using the checkbox in column D. Cell C33 displays item 2 is selected.
    The user now selects item 5. The previous item is unchecked and cell C33 displays item 5.

    How do you do that?


    Please reply

    Kapil.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by NBVC; 04-23-2009 at 01:41 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple checkoxes

    One way:

    Right click first checkbox and select Format Control.. in the Cell Link field of the Control tab, enter a cell reference, say $H$1

    Repeat for each checkbox consecutively assigning them to cells in column H... (ie. $H$2, $H$3....)

    You can then Hide column H, if desired.

    Then formula in C3:

    =IF(COUNTIF(H:H,TRUE),MATCH(TRUE,H:H,0),"")

    This will return position of first checked box...(if one or more are selected).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-22-2009
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Multiple checkoxes

    Thanks for the solution man. It is the simplest.
    But the output the code shows is the row no. I would like my output to be the column C in that row (probably little tweak in the code would do it..i don't know how...)

    Also is there any way to uncheck previously checked box once the user checks the next one. As its important to check only one box at a time .

    Please reply.

  4. #4
    Registered User
    Join Date
    04-22-2009
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Multiple checkoxes

    I am attaching a picture herewith ..Please see it...
    Attached Images Attached Images

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple checkoxes

    You should then use OptionButton enclosed in a GroupBox

    So remove the checkboxes..

    Click GroupBox and draw the box in the area you want the option put.

    Click OptionButton and draw with groupbox, repeat and organize

    Then rightclick any Option and select Format Control and enter $C$33 in the Cell Link field.

  6. #6
    Registered User
    Join Date
    04-22-2009
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    68

    Re: Multiple checkoxes

    When I click on option 1 , the output in cell C33 comes out to be 1.
    If I click on option 22 , the output is cell C33 is 22.
    But I want the output to be the corresponding cell in Column C.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Multiple checkoxes

    If your options are aligned, then use another cell for cell link and then use Index() function to find corresponding item..

    e.g.

    =INDEX(C5:C10,X1) where X1 is the cell link for the options and C5:C10 is the corresponding range of items to your options.

  8. #8
    Registered User
    Join Date
    04-22-2009
    Location
    Boston
    MS-Off Ver
    Excel 2013
    Posts
    68

    [SOLVED] Multiple checkoxes

    You are the man...thanks a lot

+ 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