+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    05-16-2009
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    10

    How to Add and Divide Cells w/ A Certain Value???

    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?

  2. #2
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    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"}))

  3. #3
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,379

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0