Avatar of agwalsh
agwalsh
 asked on

checkbox/option button in specific cell in Excel - how to add to cell

hi
I'm wondering how to do the following..
I want to set up a sheet so that the following happens...
The user ticks a checkbox/option button. This automatically gives the cell it is in a value e.g. -1 etc. I plan to have a calculations sheet set up with the formulas...but my first step is how do I add a checkbox that is linked to a specific cell so that I can reference that cell in a formula...
Thank you
Microsoft OfficeMicrosoft Excel

Avatar of undefined
Last Comment
byundt

8/22/2022 - Mon
SOLUTION
ScriptAddict

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ScriptAddict

After you insert it you format control, and click on the control tab.  And then link it to a cell.

Please note that there are "form" controls and Active X controls.  The Active X are designed to be used with VBA, so if you are not familiar with VBA or just don't want to use it make sure you insert the FORM controls :)

-SA
agwalsh

ASKER
@Script Addict - thank you - got all that. Now when I check this value I get true - how could I set this to become a value if checked e.g. when it's checked, the value of that cell becomes -1 for example...
ScriptAddict

Well, you have two options.  You could either use a formula that uses an if statement

Don't put the true/false cell in the cell you need the value in.  Then just use a formula like

if(A1=True, -1, 0)  - where A1 is the cell you do have the checkmark linked too.

Or you can use the VBA switch and use an event trigger to edit the cell value based on whatever vba you want to code.


Personally I'd just have my formula assign a value based on the True/false, and an if statement in my formula.
Your help has saved me hundreds of hours of internet surfing.
fblack61
agwalsh

ASKER
Ok, that's fine. I can do that...I just thought there might be a way in the properties to do it that I hadn't seen...thank you!
A
ASKER CERTIFIED SOLUTION
byundt

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question