Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
blazon
 
Posts: n/a
Default Can you help me write this formula?


I'm trying to create a formula that involves counting and percents. So,
in the range A9:AE9, I want to count the number of times "y" appears
(each cell of the range has a "y", "n", or "n/a") and divide that
number by 31 (the number of columns in the range). It sounds simple,
but I can't figure it out!

Any help is appreciated.

Thanks!


--
blazon
------------------------------------------------------------------------
blazon's Profile: http://www.excelforum.com/member.php...o&userid=27409
View this thread: http://www.excelforum.com/showthread...hreadid=469224

  #2   Report Post  
swatsp0p
 
Posts: n/a
Default


Try this:

=COUNTIF(A9:AE9,"=y")/31


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=469224

  #3   Report Post  
blazon
 
Posts: n/a
Default


Hey, that works, thanks!

I just realized that I don't want the 'n/a' to negatively impact the
percent. I'm basically tracking goals and so ideally, if everyone meets
their goal, they will achieve 100%. If a 'n/a' is recorded, is there a
way then that I can not have that cell counted in the calculation of
the percent? So, if there are 3 'n/a's, then rather than dividing by
31, excel would divide by 28?

Thanks so much for your help!


--
blazon
------------------------------------------------------------------------
blazon's Profile: http://www.excelforum.com/member.php...o&userid=27409
View this thread: http://www.excelforum.com/showthread...hreadid=469224

  #4   Report Post  
swatsp0p
 
Posts: n/a
Default


Remember, you are dividing by the number of columns. Is there only one
entry per column, therefore, an N/A makes that column not part of the
group?


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=469224

  #5   Report Post  
blazon
 
Posts: n/a
Default


Yes, that's correct.


--
blazon
------------------------------------------------------------------------
blazon's Profile: http://www.excelforum.com/member.php...o&userid=27409
View this thread: http://www.excelforum.com/showthread...hreadid=469224



  #6   Report Post  
swatsp0p
 
Posts: n/a
Default


Then subtract the number of "n/a" from the count of columns (31), as
such:

=COUNTIF(A9:AE9,"=y")/(31-COUNTIF(A9:AE9,"=n/a"))

Should work.


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=469224

  #7   Report Post  
Sloth
 
Posts: n/a
Default

=COUNTIF(A9:AE9,"=y")/(COUNTA(A9:AE9)-COUNTIF(A9:AE9,"=n/a"))

or

=COUNTIF(A9:AE9,"=y")/(31-COUNTIF(A9:AE9,"=n/a"))

(If the number of columns is always 31)

These formulas should work.

"blazon" wrote:


Hey, that works, thanks!

I just realized that I don't want the 'n/a' to negatively impact the
percent. I'm basically tracking goals and so ideally, if everyone meets
their goal, they will achieve 100%. If a 'n/a' is recorded, is there a
way then that I can not have that cell counted in the calculation of
the percent? So, if there are 3 'n/a's, then rather than dividing by
31, excel would divide by 28?

Thanks so much for your help!


--
blazon
------------------------------------------------------------------------
blazon's Profile: http://www.excelforum.com/member.php...o&userid=27409
View this thread: http://www.excelforum.com/showthread...hreadid=469224


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
Formula works in some cells, doesn't in other Wowbagger New Users to Excel 13 June 30th 05 03:21 PM
How do I write formula to compare two values and pull the resulta. Renee Excel Worksheet Functions 1 February 11th 05 01:31 AM
how do i write a formula and keep in in formula form, so it DOESN. norcalchick2207 Excel Discussion (Misc queries) 2 February 4th 05 08:38 PM
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
How do I write my formula to automatically regenerate a RAND () i. Regi Excel Worksheet Functions 1 December 8th 04 10:06 PM


All times are GMT +1. The time now is 04:29 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"