okay you want to count or sum checked check boxes in Microsoft Excel I'm going to show you two methods first method perfect for you if you've only got say 10 to 20 check boxes if you've got a lot more if you've got hundreds you'll want to use the second method okay let's look at the first method now these check boxes here I've inserted via the developer tab if you cannot see the developer tab on your Ribbon you need to right click one of the other tabs customize the ribbon and then make sure developer is ticked in this list here on the developer tab go to the insert button and you can use this checkbox here of default controls what you would do is you click on it and then click where you want the checkbox to appear and then you can reposition it now I haven't used any text on site my checkbox so I can just get rid of that text what you will need to do is right click on your check box go to format control and Link the check box to a cell so you click in this cell Link Box here and then select a cell I'm going to say the seller Jason d11 you'll see how this works so now if I tick that box you can see I get a true in this cell that I've linked to and if I untick it I get false to add up the ticked check boxes let's just take say three of them what you would do is you'd use the countif function the range would be the range of sales that you've linked to your check boxes and your criteria would be true so you can see it's counted that there are three checked check boxes I take another check box it would increase the count to four now if you wanted to sum up corresponding values based on ticked check boxes you could use sumif so my range would be the linked sales or criteria would be true my sum range would be the corresponding values that you want to add up so if I tick this checkbox up here you can see it increases the total weight now if you don't want these true and false values to show what you can do is Select those cells control one on your keyboard that opens up the format sales dialog box go down to custom and then in the type box just type three semicolons and that'll hide those true and false values now the only problem with this method is it's quite laborious inserting these controls and if you need hundreds and hundreds of check boxes in your spreadsheet then it's going to be very time consuming so let's look at the second method so the first thing I want to show you relating to this method is that we can return check boxes using the character function so if I type equals character 254 that is in a check box but if I change the font to wingdings you can see I get a checked check box equally if I type character 168 and format the cell with the windings font I get an unchecked check box now the benefit of using this way of creating checkboxes is that I can very easily just copy the check boxes down into other cells so if you need many check boxes this is a much easier way of generating them now the way this method will work is that when you double click on a check box it will either change to its ticked state or unticked state and to do this we have to use a little bit of vpa code now I've provided a link to the VBA code in the description of this video so copy that code then right click on your sheet Tab and go to view code then up here where it says general change that to worksheet and where it says selection change change that to before double click then you can get rid of these last two lines of code then paste in the code that I provided between these two remaining lines of code right I'll just close down the project Explorer widen this Visual Basic editor window so I'm going to explain how this sub procedure works this macro is going to be triggered using the before double click event so every time we double click it's going to run this code there's two things you need to know about the double click event you've got Target which is the cell that you've double clicked in and you've also got cancel here which prevents the cell entering edit mode now we only want to run this code if we've double clicked into the range C2 to C11 you can see that on my sheet here that's where we have the check boxes so if we haven't double clicked into that range then basically don't want this code to run at all but if we have we're then using this select case statement and all we're doing is we're saying if the character in the cell that we've double clicked in is the ticked box then change it to the unticked box and then I'm saying cancel equals true and that basically means that the sale doesn't go into any mode and then the opposite also needs to be true that if the cell contains an unchecked chat box it needs to be changed to a checked checkbox so very simple bit of VBA code there it works perfectly for our scenario so if I double click one of these check boxes it will untick them and if I double click again on an empty check box it ticks the check box now how do I count the checked check boxes when I'm using this method equals countif the range is the cells that I currently got the chat boxes in my criteria is character 254 so you can see that works if I wanted to sum up corresponding weights or would you sum if the range would be the range of cells that contain the check boxes my criteria again is character 254 and my sum range of the corresponding weights and again if I untick one of these check boxes it changes the result of the sum of Weights okay that's all I wanted to cover in this particular video hopefully that's useful if it is please give me a thumbs up and subscribe and I'll see you next video foreign