+ Reply to Thread
Results 1 to 8 of 8

Problem with sumproduct and countif

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Problem with sumproduct and countif

    I have a spread sheet and I'm trying to sumproduct "Female" from Column B7:B40 and then to countif exam grades A* through to C grades on columns C7:C40. I've tried the following: =SUMPRODUCT(B7:B40="F")+COUNTIF(C7:C40;"A#")+COUNTIF(C7:C40;"A") But this returns either a Value or a different incorrect number.

    Can anyone help please?

    Thanks
    Jorge666

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem with sumproduct and countif

    What exactly are you trying to count/sum?

    Is it the no of females who have an exam grade A* to C?

    Can you attach a sample workbook? Hopefully that will clarify things.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Problem with sumproduct and countif

    Student Name Gender Maths English Geography Physics Biology Art Design Btec 1 Btec 2
    Student 1 M A A A A A A A Distinction Merit
    Student 2 F C E A# A D B A Pass Merit
    Student 3 F C A A# E B A Merit
    Student 4 F E A E E B A D Merit
    Student 5 F B A D B F A C Distinction Pass
    Student 6 M E F G B F A C Distinction Pass
    Student 7 M E A B F A C Distinction Pass
    Student 8 M C B A B G C E Merit
    Student 9 M C B A G B C E Merit
    Student 10 F F C F C B C G Merit Distinction
    Student 11 F F C F C D F G Pass Distinction
    Student 12 F A# C F C D A# Pass Distinction
    Student 13 F A# D G A D A# Pass
    Student 14 F A# D G G A D A#
    Student 15 F E G G A D Merit
    Student 16 F D C G A G Distinction Merit
    Student 17 M D A# C A G Distinction Merit
    Student 18 M D A# C G Distinction Merit
    Student 19 M D C C A# Distinction Merit
    Student 20 M B D C C A# Pass Pass
    Student 21 M B G F C C A# Pass Pass
    Student 22 M C G G E B Pass Pass
    Student 23 F D A D G B E B Pass
    Student 24 F D A D G B E B Merit
    Student 25 F D A G E Merit
    Student 26 M G G D E D G Pass
    Student 27 M G B G D A D G Pass
    Student 28 F G B D A Distinction Pass
    Student 29 F F B E A F Distinction Pass
    Student 30 F A F B E F D Distinction
    Student 31 M A B E F D Merit
    Student 32 M D E F B D F D Merit
    Student 33 M D E F B D F Merit Pass
    Student 34 F D E B Pass


    Total Number of A*-C grades 14 16 12 15 18 12 12 25 26
    Percentage 41% 47% 35% 44% 53% 35% 35% 74% 76%


    Total Number of A*-C grades for Girls
    Percentage

    That is right sample is above.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem with sumproduct and countif

    The board doesn't really keep the format of data when you post it, which makes it hard to follow.

    Attaching an example workbook is a better idea.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  5. #5
    Registered User
    Join Date
    12-12-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Problem with sumproduct and countif

    sorry it should be attached now.
    Attached Files Attached Files

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem with sumproduct and countif

    I'm sure there's a much better way but this seems to work.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-12-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Problem with sumproduct and countif

    Fantastic that works and would never have got that in a million years!

  8. #8
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Problem with sumproduct and countif

    put the following in C47 and drag-fill right until K47:

    Please Login or Register  to view this content.
    1010
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

+ 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