Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 05-16-2009, 10:51 AM
fateshand fateshand is offline
Registered User
 
Join Date: 16 May 2009
Location: Dallas, Texas
MS Office Version:Excel 2008 for Mac
Posts: 10
fateshand is becoming part of the community
How to Add and Divide Cells w/ A Certain Value???

Please Register to Remove these Ads

I've setup a workbook that contains a lot calculations. One of the columns in my workbook is setup to check certain cells and based on conditions I've setup, the cells will be filled in with the word "red" or "green."

I need to learn how to create a function that will add up the number of cells that have the word "red" in them and divide that by the total number of cells ("red" or "green").

So essentially I'm finding an average: red cells over both red and green cells.

Is this possible?
Reply With Quote
  #2  
Old 05-16-2009, 11:01 AM
DonkeyOte's Avatar
DonkeyOte DonkeyOte is offline
Forum Guru
 
Join Date: 22 Oct 2008
Location: Suffolk, UK
MS Office Version:2002 & 2007
Posts: 13,645
DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute
Re: How to Add and Divide Cells w/ A Certain Value???

Assuming you have more than just red & green possibilities

=COUNTIF(A:A,"red")/SUM(COUNTIF(A:A,{"red","green"}))
Reply With Quote
  #3  
Old 05-16-2009, 11:02 AM
DonkeyOte's Avatar
DonkeyOte DonkeyOte is offline
Forum Guru
 
Join Date: 22 Oct 2008
Location: Suffolk, UK
MS Office Version:2002 & 2007
Posts: 13,645
DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute DonkeyOte has a reputation beyond repute
Re: How to Add and Divide Cells w/ A Certain Value???

Your post does not comply with Rule 5 of our Forum RULES. We have Seven question forums: Miscellaneous, General, Programming, Worksheet Functions, Charting, Excel 2007 Help and New Users. Please choose the appropriate forum, and post your question in ONLY one forum.

Please red the forum rules prior to posting another question... I have on this occasion moved the thread to an appropriate forum.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump