Tallying the total amount of checkboxes checked

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Tallying the total amount of checkboxes checked

  1. #1
    New Member
    Join Date
    Jul 2002
    Location
    Earth
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    How can I add checkboxes and get a total? I'm using checkbox under the forms toolbar. Is there another way to do this without using checkboxes? (i want the sheet to tally how many "yes" or "no" boxes are checked.)
    Thanks!
    Brad

  2. #2
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    73,092
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Right click each check box and choose Format Control. Assign a cell link (different cells for each).

    The cells will show TRUE if checked, FALSE if not.

    Assuming you have 3 checkboxes linked to cells A1:A3 enter the following formula in cell A4:

    =COUNTIF(A1:A3,"True")

  3. #3
    New Member
    Join Date
    Jul 2002
    Location
    Earth
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks! That was killing me!

  4. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Brad

    You may find this alternative helpful


    Have a Cell Ticked Upon Selection

    This code must be placed in the Private Module of the Worksheet. To get there right click on the sheet name tab and select "View Code".

    This code is an alternative to Checkboxes and can save a lot of space and is much easier to count the ticks! Just use the COUNTIF Function. This code works on only range A1:A10, but can be modified to suit. It could also be used in the Before Double Click event.

    Code:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
     If Target.Cells.Count > 1 Then Exit Sub
        If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
            Target.Font.Name = "Marlett"
            If Target = vbNullString Then
               Target = "a"
            Else
               Target = vbNullString
            End If
        End If
    End Sub

    Taken from: http://www.ozgrid.com/VBA/ExcelWorkbookEvents.htm



  5. #5
    New Member
    Join Date
    Jul 2002
    Location
    Earth
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Thanks a lot Dave. I think I'll try that, as it looks more streamlined.
    -B

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com