+ Reply to Thread
Results 1 to 11 of 11

Help with COUNTIFS formula

  1. #1
    Registered User
    Join Date
    10-22-2017
    Location
    Australia, Melbourne
    MS-Off Ver
    2007
    Posts
    4

    Help with COUNTIFS formula

    Hi,

    I've created a spreadsheet that's used to collect data on the number of clients seen each month in a hearing clinic. We collect a lot of information on each client, including whether they were seen in the clinic or on outreach.

    I have used the following formula, which works for the clinic clients =COUNTIFS(norrapril, "new", coapril, "clinic", ageapril, "<18", genderapril, "male". When I change the criteria to "outreach", it returns a 0. (formula=COUNTIFS(norrapril, "new", coapril, "outreach", ageapril, "<18", genderapril, "male") - it is the exact same formula, with the only difference being "outreach" instead of "clinic".

    Hope that makes sense.

    Any suggestion would be greatly appreciated.

    Thanks
    Renee

  2. #2
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Help with COUNTIFS formula

    Hi Renee

    are you able to attach a sample workbook?

  3. #3
    Registered User
    Join Date
    10-22-2017
    Location
    Australia, Melbourne
    MS-Off Ver
    2007
    Posts
    4

    Re: Help with COUNTIFS formula

    Hi Maym

    Please see attached - all formulas are in the 'stats - monthly' worksheet

    Renee
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Help with COUNTIFS formula

    ok thanks Renee. What is the cell reference(s) of the formulas you are having trouble with?

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Help with COUNTIFS formula

    You have additional space in criteria range F:F "Outreach " (If you wish to check then go to the Jan sheet and filter Outreach and press F2, you will see additional space)

    Try

    B19
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  6. #6
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Help with COUNTIFS formula

    Quote Originally Posted by shukla.ankur281190 View Post
    You have additional space in criteria range F:F "Outreach " (If you wish to check then go to the Jan sheet and filter Outreach and press F2, you will see additional space)

    Try

    B19
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    exactly right, found it the same time as you

    Trim your values of "outreach" and should be fine.

  7. #7
    Registered User
    Join Date
    10-22-2017
    Location
    Australia, Melbourne
    MS-Off Ver
    2007
    Posts
    4

    Re: Help with COUNTIFS formula

    Thanks! I can see the space when filtering as suggested but I'm not sure how to trim the value of "outreach". It's taken from the list "clinicoutreach" - see references worksheet.

  8. #8
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Help with COUNTIFS formula

    was it copied initially? It looks ok in the ref worksheet. Perhaps copy it across once and then sort your data and paste it for each.

  9. #9
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Help with COUNTIFS formula

    Countif and Countifs function can't handle array operation. Trim function is able to remove additional space in single value but can't remove additional space in range of value ( Only can work with designed array handle formula Like SUMPRODUCT).

    Here you have additional spaces in criteria range not in criteria if you found the point of error you can easily ride off. I have spoken that you have additional spaces in criteria ranges if you can clear spaces in range then you wouldn't do change in criteria if you can't do changes in range then you would have to make sure that criteria should also look like your range.

    Functions are designed very neatly if we do anything wrong the formula give us error. The error types are given below.

    Row\Col
    A
    B
    C
    1
    #NULL!
    1
    Incorrect Range Operators.
    2
    #DIV/0!
    2
    Divided By Zero.
    3
    #VALUE!
    3
    Incorrent Data Types.
    4
    #REF!
    4
    Invalid Range.
    5
    #NAME?
    5
    Formula or Range Misspelled.
    6
    #NUM!
    6
    Huge Value.
    7
    #N/A
    7
    Data is Missing.

  10. #10
    Forum Contributor
    Join Date
    10-12-2011
    Location
    Sydney
    MS-Off Ver
    Excel 2016 in 2024
    Posts
    857

    Re: Help with COUNTIFS formula

    looking at your workbook it looks as though the data validation and list was set up after values were entered manually (or else the initial data validation had a space at the end).

    You could also insert a column in each sheet and use =TRIM(cell ref) and then copy and paste over existing values. Or else a macro to change each

  11. #11
    Registered User
    Join Date
    10-22-2017
    Location
    Australia, Melbourne
    MS-Off Ver
    2007
    Posts
    4

    Re: Help with COUNTIFS formula

    Thank you both so much - all sorted now.

    Appreciate your help.

    Renee

+ 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. Need Help with Countifs Formula
    By moerichards43 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2017, 03:27 PM
  2. [SOLVED] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  3. COUNTIFS + OR formula?
    By -jack in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-13-2016, 07:39 PM
  4. COUNTIFS Formula
    By spuri78 in forum Excel Formulas & Functions
    Replies: 69
    Last Post: 02-17-2015, 11:43 AM
  5. need help w/ countifs formula
    By cuzaliciousdef in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2014, 06:47 PM
  6. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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