percentage

  • Thread starter Thread starter cbeck0
  • Start date Start date
Hi,

Let's say you have data in the range A1:A6. The data is
represented as "y" (without the quotes) for Yes and "n"
(without the quotes) for No. In cell A8 type the
follwoing formula

COUNTIF(A1:A6,"y")/COUNTA(A1:A6)

This will give you the answer as 0.666 which is 66%

HTH

Ashish Mathur
Excel - MVP
 
When I use that formula I get "0"
-----Original Message-----
Hi,

Let's say you have data in the range A1:A6. The data is
represented as "y" (without the quotes) for Yes and "n"
(without the quotes) for No. In cell A8 type the
follwoing formula

COUNTIF(A1:A6,"y")/COUNTA(A1:A6)

This will give you the answer as 0.666 which is 66%

HTH

Ashish Mathur
Excel - MVP



.
 
Cbeck0,

Ashish assumed your column contained y's to represent
yes's, If that's not true you need to change his formula

=COUNTIF(A1:A6,"y")/COUNTA(A1:A6)
counts cells containing y's (only "y" nothing else)
=COUNTIF(A1:A6,"yes")/COUNTA(A1:A6)
counts cells containing yes's (only "yes" nothing else)
=COUNTIF(A1:A6,"y*")/COUNTA(A1:A6)
counts cells starting with y's (anything starting with y)

Dan E
 
Back
Top