Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default Counting the occurrence of "Y" & "N" in Excel 2007

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting the occurrence of "Y" & "N" in Excel 2007

=REPT("Y",COUNTIF(A5:A370,"Y"))&"/"&REPT("N",COUNTIF(A5:A370,"N"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---
"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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Counting the occurrence of "Y" & "N" in Excel 2007

Hi,

Try this:

=COUNTIF(A5:A370,"Y")&"/"&COUNTIF(A5:A370,"N")

However if your really trying to get the ratio
=COUNTIF(A5:A370,"Y")/COUNTIF(A5:A370,"N")

Might be sufficient. You can force the display of as many digits as you
want by using the custom format code:

# ????/????

In this case it would display up to 4 digits/ 4 digits
--
Thanks,
Shane Devenshire


"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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting the occurrence of "Y" & "N" in Excel 2007

Aha, I focused on this part in your orig. post, wrongly it seems:
.. with the answer resulting in the following format: YYYY/NNNN

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:19,000 Files:362 Subscribers:61
xdemechanik
---
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
how i convert "100" to "hundred"( number to text) in excel-2007 mohanraj Excel Worksheet Functions 1 May 11th 08 09:07 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 04:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"