Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lia lia is offline
external usenet poster
 
Posts: 4
Default I want to be able to input "Y" or "N" and tally them as 1 or 0.

Out of 30 possible entries, I can have either y, n or blank. I want to
equate the sum of the "Y" and divide by the total number of y+n (not blank)
entries. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default I want to be able to input "Y" or "N" and tally them as 1 or 0.

To count the "Y"'s use this formula:

=COUNTIF(A1:A30,"Y")

To count the nonblanks:

=COUNTA(A1:A30)

And, to combine the two:

=COUNTIF(A1:A30,"Y")/COUNTA(A1:A30)

HTH,
Elkar


"lia" wrote:

Out of 30 possible entries, I can have either y, n or blank. I want to
equate the sum of the "Y" and divide by the total number of y+n (not blank)
entries. Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default I want to be able to input "Y" or "N" and tally them as 1 or 0.

=COUNTIF(A:A,"Y")/SUM(COUNTIF(A:A,{"Y","N"}))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"lia" wrote in message
...
Out of 30 possible entries, I can have either y, n or blank. I want to
equate the sum of the "Y" and divide by the total number of y+n (not
blank)
entries. Any ideas?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,069
Default I want to be able to input "Y" or "N" and tally them as 1 or 0.

if your data is in cells a1:a30 try =COUNTIF(A1:A30,"y")/COUNTA(A1:A30)
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"lia" wrote:

Out of 30 possible entries, I can have either y, n or blank. I want to
equate the sum of the "Y" and divide by the total number of y+n (not blank)
entries. Any ideas?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
lia lia is offline
external usenet poster
 
Posts: 4
Default I want to be able to input "Y" or "N" and tally them as 1 or 0

Thanks, I was trying to use SUMIF, but it was too clunky. This is elegant.

"Elkar" wrote:

To count the "Y"'s use this formula:

=COUNTIF(A1:A30,"Y")

To count the nonblanks:

=COUNTA(A1:A30)

And, to combine the two:

=COUNTIF(A1:A30,"Y")/COUNTA(A1:A30)

HTH,
Elkar


"lia" wrote:

Out of 30 possible entries, I can have either y, n or blank. I want to
equate the sum of the "Y" and divide by the total number of y+n (not blank)
entries. Any ideas?

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
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
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 11:49 PM.

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"