+ Reply to Thread
Results 1 to 4 of 4

How to COUNT cell based on either COLOR or correct result?

  1. #1
    Registered User
    Join Date
    04-20-2011
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2013
    Posts
    54

    How to COUNT cell based on either COLOR or correct result?

    Based on the attached Excel sheet: "How do I count the number of correct betting results i.e. "GREEN" cells for each player?
    Attached Files Attached Files
    Last edited by Kagesen; 05-12-2014 at 12:32 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to COUNT cell based on either COLOR or correct result?

    Based on your sample....
    =SUMPRODUCT(--(D3:D11=E3:E11))

    Note also, you do not need to use AND() in those CR rules. You use AND when you want to check the outcome of 2 or more tests...=AND(A1=1,B1=1,C1=1)

    wit what you are doing, all you need is =E3=D3
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-20-2011
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2013
    Posts
    54

    Re: How to COUNT cell based on either COLOR or correct result?

    Hi FDibbins,

    Thank you for the swift reply. I just have an additional question. What's the purpose of writing "--" in your formula?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How to COUNT cell based on either COLOR or correct result?

    This part...
    D3:D11=E3:E11

    produces a series of TRUE or FALSE answers for the match/not match. the -- (double negative) converts the TRUE to 1...the 1st - creates a -1, the 2nd - converts that to positive.

    Thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Count cells based on cell color
    By vamshi57 in forum Excel General
    Replies: 3
    Last Post: 04-14-2014, 02:11 AM
  2. Color cell based on vlookup value result
    By XCman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2012, 01:08 PM
  3. Replies: 2
    Last Post: 01-03-2012, 11:23 AM
  4. Count based on cell fill color
    By hmesler in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-29-2011, 01:01 PM
  5. Replies: 3
    Last Post: 05-17-2008, 05:25 AM

Tags for this Thread

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.6.0 RC 1