View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Counting the occurrence of "Y" & "N" in Excel 2007

=rept("y",countif(a5:a370,"y"))&"/"&rept("n",countif(a5:a370,"n"))

You really want:

yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/nnnnnnnnnnnnnn

or maybe:

=countif(a5:a370,"y")&"/"&countif(a5:a370,"n")

to see something like:
140/139




Christi wrote:

I'm just now trying to learn the COUNTIF function but obviously am having a
problem...

If the cell range is (A5:A370) and I need to count the "Y" 's and the "N"
's with the answer resulting in the following format: YYYY/NNNN what would
I use?

Any help apreciated!
--
~Christi


--

Dave Peterson