+ Reply to Thread
Results 1 to 5 of 5

CheckBox Programming

  1. #1
    Registered User
    Join Date
    04-13-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    CheckBox Programming

    Hey guys,

    I have a user that has added a check box to their excel sheet and wants to only sum the cells next to the box that is checked... Anyone have a clue how to do this? I would assume the user will have to determine if the box is checked then some how add the cell next to it to their sum statement, but not really sure how to go about that. Ideas?

    Thank you in advance,

    Jon

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Excel 2007 CheckBox Programming

    What kind of checkbox is it? Is it Form Control or Activex Control??? Can you post you sample workbook to see ...
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Registered User
    Join Date
    04-13-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Excel 2007 CheckBox Programming

    It's a form control. The user has left, but I could probably get a sample tomorrow.

  4. #4
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Excel 2007 CheckBox Programming

    So if it is Form Control
    1. Right click on your control and select "Format Control" option. Dialog box pops-up.
    2. There's "Cell Link" field on Control tab. Say your cell link is A1 (See image1). So when you fill the check box A1 will return TRUE , when you uncheck A1 will become FALSE. Using these logical staements you cxan do whatever you want. For example you wanna sum B1:B10 when checkbox is filled. So try this formula in C1
    3. =IF(A1,SUM(B1:B10),"Unchecked")
    Attached Images Attached Images

  5. #5
    Registered User
    Join Date
    04-13-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Excel 2007 CheckBox Programming

    Ok that sounds reasonable, but what if I want to only sum the cells that are checked?

+ 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