+ Reply to Thread
Results 1 to 5 of 5

use option button to define what range of cells to sum

Hybrid View

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    16

    use option button to define what range of cells to sum

    Hello I am trying to use an option button to select from a couple of different options. I am grouping car choice and then grouping transmission option. I am trying to allow someone to select an option and have it sum only the options selected and either gray out the other available options or clear the cell values from the other options. The scenario would be, once the option is selected a range of cells is summed and copied to a total at the bottom of the sheet. Last wondering how after the selection has been completed can clear the selected options and start over.

    I am trying to use the ActiveX version of the option button but not sure how to set up.

    Example

    Option Button 1 (group a)
    RED CAR
    Black seats
    Total $ 12000 cell (C5)

    Option Button 2 (group a)
    BLUE CAR
    Black Seats
    Total $ 12500 cell (H5)

    Option Button 1 (group b)
    Manual Transmission
    Total $ 500 cell (L5)

    Option Button 2 (group b)
    Automatic Transmission
    Total $ 950 cell (N5)


    Total Price from both option groups $ xxxxxx cell ((Q5)

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: use option button to define what range of cells to sum

    Attach a Workbook
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: use option button to define what range of cells to sum

    Test Option Button Selectable.xlsm

    Hopefully the sheet was attached

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: use option button to define what range of cells to sum

    "....I am trying to allow someone to select an option and have it sum only the options selected...."

    On tab "2004" I placed
    1. two Group Boxes, one for penta and one for wireless.
    2. replaced ActiveX option buttons with five "forms control" option buttons in the penta group box, set the linked cell to I1. Select the five buttons and the group box then select "group".
    3. replaced ActiveX option buttons for wireless with three forms control option buttons, and grouped them, etc.

    For the total in E71:
    =CHOOSE($I$1,0,E13,E21,E31,E44)+CHOOSE($J$1,0,E57,E65)
    The penta option buttons will range from 1 - 5. Option button 1 will clear the other four and add zero to the sum, etc.

    In F71, then:
    =CHOOSE($I$1,0,F13,F21,F31,F44)+CHOOSE($J$1,0,F57,F65)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-14-2012
    Location
    LA, CA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: use option button to define what range of cells to sum

    Thanks protonLeah,

    Exactly what I was wanting to perform. I now understand the form function a great deal more.

    Thanks a bunch for the help.

+ 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. [SOLVED] Autofill Vlookup/Formula to last row in multi range and option button
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 11-05-2012, 02:01 AM
  2. Define name for range of cells
    By dagerik in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2007, 01:16 PM
  3. Define a range of cells in VBA
    By Noemi in forum Excel General
    Replies: 2
    Last Post: 10-20-2005, 12:05 AM
  4. Re-define a range in cells
    By Geoff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2005, 06:05 AM
  5. how do i define a range as a list when there is no list option in.
    By Domespacio in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-25-2005, 06:36 AM

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