Count Tick Marks from Code given by Jacob Skaria

C

Cindy Renea

I got this code from Jacob and now I need to know how to tally the columns and give a percentage of how many "x" marks were made. I am using Excel 2007, and no absolutely nothing about code, except maybe how to paste. Here is the code:

Another workaround with fonts. Single click on any range to check/uncheck.

1. In the required range (suppose ColD) in all cells enter small letter "e".
2. Select all cells in that range and change the font to Marlett.
3. Adjust the column width to look like a square check box
4. Right click on the sheet tab and hit view code. Paste the below code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Font.Name = "Marlett" And Target.Count = 1 Then
Target.Value = IIf(Target.Value = "r", "e", "r")
'Target.Value = IIf(Target.Value = "a", "e", "a") 'For tick mark
End If
End Sub

Try single click on any of the cells in that range. To remove the check mark
click on another cell out of the range and again click on the cell.



Submitted via EggHeadCafe - Software Developer Portal of Choice
Join Lists with LINQ - SharePoint 2010
http://www.eggheadcafe.com/tutorial...6e-7d3fb7d38eca/join-lists-with-linq--sh.aspx
 
D

Dave Peterson

=countif(a:a,"e")
will count the number of cells with e
=countif(a:a,"r")
will count the number of cells with r

=counta(a:a)
will count the number of non-empty cells.

=countif(a:a,"e")/counta(a:a)
will give the percentage of e's.
 
C

Cindy Renea

Dave,
For whatever reason (code maybe?) all it returns me is "FALSE" in the cell where I type those formulas. It does not seem to be acknowledging those "e"s or "r"s.



Dave Peterson wrote:

=countif(a:a,"e")will count the number of cells with e=countif(a:a,"r")will
10-Mar-10

=countif(a:a,"e"
will count the number of cells with
=countif(a:a,"r"
will count the number of cells with

=counta(a:a
will count the number of non-empty cells

=countif(a:a,"e")/counta(a:a
will give the percentage of e's


Cindy, Renea wrote

-

Dave Peterson

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Get Started with SQLite and Visual Studio
http://www.eggheadcafe.com/tutorial...b-b6f46d4f2c6a/get-started-with-sqlite-a.aspx
 
D

Dave Peterson

I think you changed the formula.

You'll have to share what you used for me to guess.

Or you could try the suggested formulas once more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top