This should be pretty easy - I just can't seem to figure it out...
I have a list of people that attended a class each has a quot;Yquot; or quot;Nquot;. I
want % that attended the class. So - the # attended divided by the
total number possible. It should be a count of quot;Yquot;'s divided by counta
of the column?...
Help?!--
tmerton
------------------------------------------------------------------------
tmerton's Profile: www.excelforum.com/member.php...oamp;userid=32574
View this thread: www.excelforum.com/showthread...hreadid=523732Try this:
=COUNTIF(A1:A100,quot;Yquot;)/COUNTA(A1:A100)
HTH,
Elkar
quot;tmertonquot; wrote:
gt;
gt; This should be pretty easy - I just can't seem to figure it out...
gt;
gt; I have a list of people that attended a class each has a quot;Yquot; or quot;Nquot;. I
gt; want % that attended the class. So - the # attended divided by the
gt; total number possible. It should be a count of quot;Yquot;'s divided by counta
gt; of the column?...
gt;
gt; Help?!
gt;
gt;
gt; --
gt; tmerton
gt; ------------------------------------------------------------------------
gt; tmerton's Profile: www.excelforum.com/member.php...oamp;userid=32574
gt; View this thread: www.excelforum.com/showthread...hreadid=523732
gt;
gt;
This is the formula I am using:
=COUNTIF(R16:R44,quot;Yquot;)/COUNTA(R16:R44)
The conditional formatting I am using works on most cells but a couple
are not working i.e.
[/indent]0 to .7 = red
[/indent].71 to .8 = yellow
[/indent].81 above = green
A couple cells are not formatted - I am thinking it has to do w/the
cell being formatted for % vs. decimal pt. and maybe the decimal is out
by alot.
Any suggestions?...--
tmerton
------------------------------------------------------------------------
tmerton's Profile: www.excelforum.com/member.php...oamp;userid=32574
View this thread: www.excelforum.com/showthread...hreadid=523732The conditions are read in order so if the first condition is
True it is used, If not the second formulas is checked, if that is not
True then the third formulas is checked.
I am not sure of your layout, but since you say it works for most cases
will assume you selected the cells you want colored and that is probably
only once cell.
Condition 1:
=COUNTIF(R16:R44,quot;Yquot;)/COUNTA(R16:R44) lt;= .7
Condition 2
=COUNTIF(R16:R44,quot;Yquot;)/COUNTA(R16:R44) lt;= .8
Condition 3:
=COUNTIF(R16:R44,quot;Yquot;)/COUNTA(R16:R44) lt;= 1
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: www.mvps.org/dmcritchie/excel/excel.htm
Search Page: www.mvps.org/dmcritchie/excel/search.htm
quot;tmertonquot; gt; wrote in message
...
gt;
gt; This is the formula I am using:
gt; =COUNTIF(R16:R44,quot;Yquot;)/COUNTA(R16:R44)
gt;
gt; The conditional formatting I am using works on most cells but a couple
gt; are not working i.e.
gt; [/indent]0 to .7 = red
gt; [/indent].71 to .8 = yellow
gt; [/indent].81 above = green
gt;
gt; A couple cells are not formatted - I am thinking it has to do w/the
gt; cell being formatted for % vs. decimal pt. and maybe the decimal is out
gt; by alot.
gt;
gt; Any suggestions?...
gt;
gt;
gt; --
gt; tmerton
gt; ------------------------------------------------------------------------
gt; tmerton's Profile: www.excelforum.com/member.php...oamp;userid=32574
gt; View this thread: www.excelforum.com/showthread...hreadid=523732
gt;
- May 27 Tue 2008 20:44
Count Formula?
close
全站熱搜
留言列表
發表留言
留言列表

