ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using checkboxes, can I write formulas based on what is checked? (https://www.excelbanter.com/excel-worksheet-functions/180149-using-checkboxes-can-i-write-formulas-based-what-checked.html)

Liz

Using checkboxes, can I write formulas based on what is checked?
 
If I use checkboxes for different types of defects, can I then create a
formula to add up what is checked?

Thanks,
Liz

Dave Peterson

Using checkboxes, can I write formulas based on what is checked?
 
You could use code that would inspect the checkboxes, but maybe you could just
use a linked cell for each checkbox.

If you do it nicely and put the linked cells in the same column, you could use:

=countif(a1:A10,true)

If you wanted to use code, you'd want to share where those checkboxes are--on a
userform or a worksheet. And if they're on a worksheet, are they from the Forms
toolbar or from the Control Toolbox toolbar?

Liz wrote:

If I use checkboxes for different types of defects, can I then create a
formula to add up what is checked?

Thanks,
Liz


--

Dave Peterson

Billy Liddel

Using checkboxes, can I write formulas based on what is checked?
 
Hi Liz

If you mean a checkbox object then the answer is no. However, the font
Windings2 gives the following symbols; Capital O gives a Tick and capital P
gives an X, there are other symbols you could use.

you might be able to use a SUMIF function, say you symbols in D2:d10 and you
want to count how many crosses (x's) Type Countif(D2:D10,"O"). This gives the
count of how many P in the range. Note it is a "O" the font just displays a
fancy X.

If you wanted to add numbers in column C that have a O in column D use
SUMIF(=SUMIF(D2:D10,"O",C2:C10)


Hope that this helps
Peter

"Liz" wrote:

If I use checkboxes for different types of defects, can I then create a
formula to add up what is checked?

Thanks,
Liz



All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com