Cell links to check boxes

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I was wondering what formula/approach to use to be able to use a
check box, and depending on whether that box is checked, two
columns to the right would or would not display the correpsonding
value to be included in the total. So again, I have check boxes in
column A, the item name in column B, and the corresponding item
value in column C. When checking the box, I hope to be able to make
the value appear (to be included in the sum of column C) and vice
versa. Hope that's clear. Thanks in advance.
 
Well, you could have a list box which fills itself with
the amount in column c and link that to a cell in another
column, say column D. This would allow you to total
column D and it would only fill in the amounts for the
ones you select. And you could hide the amounts in column
c, behind the list box, so that there would not be
duplicate information showing. The list box has an option
in it's properties which will place a circle for
selection, the property is called liststyle, enter the
cell column and row to be filled in the property called
linkedcell, and where the list box is filled from in the
property called listfillrange. Hope this makes sense.

Deb
 
Do you have a linked cell associated with your checkboxes?

If no, then add a linked cell (maybe in column A under the checkbox with the
custom format of ";;;" so that the values won't show in the worksheet).

So you'd have:

checkbox
linked cell Name Value

If you wanted to see the value all the time, you could use column D with this
formula:

=if(a1=True,c1,"") to make it look empty
or
if(a1=True,c1,0) to see zeros

Or you could change the value in column C to be a formula:
=if(a1=true,3433.00,"")

I like the helper column. I think it's easier to look for errors later.

If you didn't want to screw with column D or column C, you could change the
formula that adds up column C:

Instead of something like:
=sum(C1:c999)
you could use:
=sumif(a1:a999,True,c1:C999)

But the key to your formula is that linked cell for each checkbox.
 
Back
Top