+ Reply to Thread
Results 1 to 7 of 7

If and countif function not producing correct result(s)

  1. #1
    Registered User
    Join Date
    08-14-2020
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    If and countif function not producing correct result(s)

    Hello,
    I'm working with multiple worksheets and need to create a summary sheet of key data points. I'm using the following IF and COUNTIF formula but it's not producing the correct results.

    =IF('List 1'!F:F="A",COUNTIF('List 1'!C:C,"Male"),"0")

    I have 25 rows. If the status in column F is equal to A than count how many are Male in column C. I'll need to do the same for Female.
    19 records are A and 6 records are I
    Of the 19 records that are A, 12 are Male and 7 are Female. However, the results reflect 16 Male and 9 Female. It's including those with a status of I. I've read and tried multiple suggestions on how to correct the formula but none of them have worked. Any guidance would be appreciated.

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: If and countif function not producing correct result(s)

    Try this:

    =COUNTIFS('List 1'!F:F,"A",'List 1'!C:C,"Male")

    =COUNTIFS('List 1'!F:F,"A",'List 1'!C:C,"Female")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,084

    Re: If and countif function not producing correct result(s)

    How about in B2 dragged across
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: If and countif function not producing correct result(s)

    Try

    in B2 and drag to C2

    Please Login or Register  to view this content.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,466

    Re: If and countif function not producing correct result(s)

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied across

    oops. very late to the party
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Registered User
    Join Date
    08-14-2020
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: If and countif function not producing correct result(s)

    Ali - YES!! This worked. Thank you SOOO MUCH! Have a great day.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: If and countif function not producing correct result(s)

    But there are better (improved) versions from others - don't ignore them!

    Are you still using Excel 2010? If not, please update your profile.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. COUNTIF as argument not producing correct number
    By jagostinho in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2022, 01:08 PM
  2. Excel multi formula calculations not producing the correct result
    By pepsi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-15-2018, 11:30 AM
  3. [SOLVED] Len function not producing the right result
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2017, 06:02 PM
  4. Equation Not Producing the correct result
    By boynejs in forum Excel General
    Replies: 7
    Last Post: 02-12-2016, 10:31 PM
  5. [SOLVED] Percenages in Powerpivot Grand total is not producing correct result
    By rv02 in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-21-2015, 12:32 PM
  6. [SOLVED] IF formula using dates not producing correct result
    By Snelms in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-14-2014, 03:48 PM
  7. SUM function not producing correct result
    By angiebro in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-28-2010, 06:10 PM

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