+ Reply to Thread
Results 1 to 5 of 5

counting conditionally formatted columns

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    San Jose, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    counting conditionally formatted columns

    Hi,

    I'm new to this forum and have looked around for help with a problem. I've come up with part of the solution based on my reading so I'm thankful already.

    I have a spreadsheet in which I've put in students answers and conditionally formatted them to be red if their answers are wrong. There are three types of answers--correct (in black), wrong (in red), and blank , where the students did not answer. I'm trying to figure out how to count the different answers. So far, I have gotten the answer on how to count the correct answers and this is the formula I used:

    =SUMPRODUCT(--(B2:B49=$B$2:$B$49))

    How do I now count the wrong answers (including the blanks) and also the blanks (on its own)?

    Edit: I've attached a sample spreadsheet of what I need to get.

    Thank you in advance for your help.
    Attached Files Attached Files
    Last edited by greengem; 05-03-2013 at 07:56 PM. Reason: adding excel spreadsheet

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: counting conditionally formatted columns

    won't
    =SUMPRODUCT(--(B2:B49=$B$2:$B$49)) always return 48?
    what are the three conditions you have used?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-03-2013
    Location
    San Jose, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: counting conditionally formatted columns

    Oh d'uh. Sorry, I typed wrongly. Here is the corrected formula:

    =SUMPRODUCT(--(D2:D49=$B$2:$B$49))

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: counting conditionally formatted columns

    all the wrong answers is =SUMPRODUCT(--(D2:D49<>$B$2:$B$49)) or =48-SUMPRODUCT(--(D2:D49=$B$2:$B$49))
    all the blanks are ,not sure which is the column with 48 answers is here lets assume its col D and students answers in col b
    =COUNTIF(b2:b49,"=") will count blanks in col b

  5. #5
    Registered User
    Join Date
    05-03-2013
    Location
    San Jose, CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: counting conditionally formatted columns

    Thank you very much. That worked. I had tried the first formula for wrong answers but that didn't work and your second suggestion worked beautifully.

+ Reply to Thread

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