View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
christi christi is offline
external usenet poster
 
Posts: 30
Default Counting the occurrence of "Y" & "N" in Excel 2007

Thanks fella's! I knew this was my best chance. :0)
--
~Christi


"Dave Peterson" wrote:

=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