ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Checkbox sum (https://www.excelbanter.com/excel-programming/399371-checkbox-sum.html)

Fred's

Checkbox sum
 
Hi,

I need to know how can I make a sum with checkboxes

Example:

Containers: caxu125414, quanity of pairs: 220

Containers: chjcu25455, quanity of pairs: 5620

And next to the quanity cell, I've a checkbox (True or False)

Now, how and which formula can I use to make a sum, when the ckeckbox
is at TRUE?


OssieMac

Checkbox sum
 
Hi Fred,

Create a linked cell for the checkbox anywhere on the worksheet and sum the
values if the cell is true otherwise put nothing (2 double quotes like this
"") in the cell.

Example assuming A1 is the linked cell and D2:D4 is the range to sum.

=IF(A1=TRUE,SUM(D2:D14),"")

If statement which tests for True or False can be shortened to this:-

=IF(A1,SUM(D2:D14),"")

Regards,

OssieMac



"Fred's" wrote:

Hi,

I need to know how can I make a sum with checkboxes

Example:

Containers: caxu125414, quanity of pairs: 220

Containers: chjcu25455, quanity of pairs: 5620

And next to the quanity cell, I've a checkbox (True or False)

Now, how and which formula can I use to make a sum, when the ckeckbox
is at TRUE?



OssieMac

Checkbox sum
 
Hi again Fred,

Had another look at this and not sure if I got your meaning correct. If you
meant that you want to sum each value that has a checkbox beside it then you
need a linked cell beside each value for the associated checkbox. Assuming
that the range containing the values is D2:D14 then the linked cells could be
C2:C14. The forumla would then be:-

=SUMIF(C2:C14,TRUE,D2:D14)

The linked cells can be over to the right of your data out of sight just so
long as they line up with the range to be summed.

Hope one of the answers is what you want.

Regards,

OssieMac




"OssieMac" wrote:

Hi Fred,

Create a linked cell for the checkbox anywhere on the worksheet and sum the
values if the cell is true otherwise put nothing (2 double quotes like this
"") in the cell.

Example assuming A1 is the linked cell and D2:D4 is the range to sum.

=IF(A1=TRUE,SUM(D2:D14),"")

If statement which tests for True or False can be shortened to this:-

=IF(A1,SUM(D2:D14),"")

Regards,

OssieMac



"Fred's" wrote:

Hi,

I need to know how can I make a sum with checkboxes

Example:

Containers: caxu125414, quanity of pairs: 220

Containers: chjcu25455, quanity of pairs: 5620

And next to the quanity cell, I've a checkbox (True or False)

Now, how and which formula can I use to make a sum, when the ckeckbox
is at TRUE?




All times are GMT +1. The time now is 02:25 AM.

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