Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tony
 
Posts: n/a
Default Count Check Boxes

I have created a column that has check Boxes using the Control Toolbar. How
do I count the total number of checkc boxs in a column, that have check marks
in them. I do not know VBA, only know how to create and paste a function was
already set up for me. Thanks in advance, Tony
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

You can set up a LinkedCell for each checkbox. (It's under properties when you
rightclick on the checkbox (while in design mode).)

Then you can put those in a column (hidden) in the same row as the checkbox.

then
=countif(e:e,true)
(use the correct column, though)

Tony wrote:

I have created a column that has check Boxes using the Control Toolbar. How
do I count the total number of checkc boxs in a column, that have check marks
in them. I do not know VBA, only know how to create and paste a function was
already set up for me. Thanks in advance, Tony


--

Dave Peterson
  #3   Report Post  
Tony
 
Posts: n/a
Default

Thanks Dave,

This worked exactly like you said it would. I have 5,000 rows, do I have to
do the LINKCELL for every row.

"Dave Peterson" wrote:

You can set up a LinkedCell for each checkbox. (It's under properties when you
rightclick on the checkbox (while in design mode).)

Then you can put those in a column (hidden) in the same row as the checkbox.

then
=countif(e:e,true)
(use the correct column, though)

Tony wrote:

I have created a column that has check Boxes using the Control Toolbar. How
do I count the total number of checkc boxs in a column, that have check marks
in them. I do not know VBA, only know how to create and paste a function was
already set up for me. Thanks in advance, Tony


--

Dave Peterson

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about something like this that will assign the linked cell to Column A of
the same row that holds the checkbox (from the Control toolbox toolbar):

Option Explicit
Sub testme()

Dim OLEObj As OLEObject
Dim wks As Worksheet
Set wks = Worksheets("sheet1")

For Each OLEObj In wks.OLEObjects
If TypeOf OLEObj.Object Is MSForms.CheckBox Then
OLEObj.LinkedCell _
= wks.Cells(OLEObj.TopLeftCell.Row, "A") _
.Address(external:=True)
End If
Next OLEObj

End Sub

If you're new to macros, you may want to read David's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Change that "A" to whatever column you really want.



Tony wrote:

Thanks Dave,

This worked exactly like you said it would. I have 5,000 rows, do I have to
do the LINKCELL for every row.

"Dave Peterson" wrote:

You can set up a LinkedCell for each checkbox. (It's under properties when you
rightclick on the checkbox (while in design mode).)

Then you can put those in a column (hidden) in the same row as the checkbox.

then
=countif(e:e,true)
(use the correct column, though)

Tony wrote:

I have created a column that has check Boxes using the Control Toolbar. How
do I count the total number of checkc boxs in a column, that have check marks
in them. I do not know VBA, only know how to create and paste a function was
already set up for me. Thanks in advance, Tony


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Tony
 
Posts: n/a
Default

WOW! Marvelous, Fantastic, PERFECT,,,,,,,,Thanks

"Dave Peterson" wrote:

How about something like this that will assign the linked cell to Column A of
the same row that holds the checkbox (from the Control toolbox toolbar):

Option Explicit
Sub testme()

Dim OLEObj As OLEObject
Dim wks As Worksheet
Set wks = Worksheets("sheet1")

For Each OLEObj In wks.OLEObjects
If TypeOf OLEObj.Object Is MSForms.CheckBox Then
OLEObj.LinkedCell _
= wks.Cells(OLEObj.TopLeftCell.Row, "A") _
.Address(external:=True)
End If
Next OLEObj

End Sub

If you're new to macros, you may want to read David's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Change that "A" to whatever column you really want.



Tony wrote:

Thanks Dave,

This worked exactly like you said it would. I have 5,000 rows, do I have to
do the LINKCELL for every row.

"Dave Peterson" wrote:

You can set up a LinkedCell for each checkbox. (It's under properties when you
rightclick on the checkbox (while in design mode).)

Then you can put those in a column (hidden) in the same row as the checkbox.

then
=countif(e:e,true)
(use the correct column, though)

Tony wrote:

I have created a column that has check Boxes using the Control Toolbar. How
do I count the total number of checkc boxs in a column, that have check marks
in them. I do not know VBA, only know how to create and paste a function was
already set up for me. Thanks in advance, Tony

--

Dave Peterson


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protection of check boxes in excel 2002 Newbeetle Excel Discussion (Misc queries) 2 March 14th 05 12:59 PM
use check boxes in excell Dan Excel Worksheet Functions 0 February 22nd 05 01:41 PM
How to align check boxes on an Excel sheet? CC Excel Worksheet Functions 2 February 16th 05 03:27 PM
Adding Check Boxes Mike R Excel Discussion (Misc queries) 2 February 13th 05 03:59 AM
Filters and Check Boxes Steved Excel Worksheet Functions 0 January 27th 05 12:44 AM


All times are GMT +1. The time now is 05:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"