+ Reply to Thread
Results 1 to 4 of 4

Countifs not working with greater than (>1)

  1. #1
    Registered User
    Join Date
    06-29-2016
    Location
    Doncaster england
    MS-Off Ver
    2010
    Posts
    2

    Thumbs down Countifs not working with greater than (>1)

    Hi guys

    I have been scratching my head on this one for an hour, i have a range (Sheet1!$B2:$B99999) that has 1 to 10 in i have written a sum(countifs to count all the ones in the range (matching all other criteria ) and this is working fine (formula below)

    =SUM(COUNTIFS(Sheet1!$B2:$B99999,"1",Sheet1!$C$2:$C$99999,Sheet2!C24,Sheet1!$F$2:$F$99999,Sheet2!$A$1,Sheet1!$J$2:$J$99999,Sheet2!$A$12),COUNTIFS(Sheet1!$B2:$B99999,"1",Sheet1!$C$2:$C$99999,Sheet2!C24,Sheet1!$F$2:$F$99999,Sheet2!$A$1,Sheet1!$J$2:$J$99999,Sheet2!$A$14))

    however when i try and add a grater than 1 to count the remaining 2 to 10. it returns nothing

    =SUM(COUNTIFS(Sheet1!$B$2:$B$99999,">1",Sheet1!$C$2:$C$99999,Sheet2!C24,Sheet1!$F$2:$F$99999,Sheet2!$A$1,Sheet1!$J$2:$J$99999,Sheet2!$A$12),COUNTIFS(Sheet1!$B$2:$B$99999,">1",Sheet1!$C$2:$C$99999,Sheet2!C24,Sheet1!$F$2:$F$99999,Sheet2!$A$1,Sheet1!$J$2:$J$99999,Sheet2!$A$14))

    Please help i dont want to have to do a massive sum with 10 countifs

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countifs not working with greater than (>1)

    If the range Sheet1!$B2:$B99999 contains TEXT numbers, the logical test: COUNTIFS(Sheet1!$B2:$B99999,"1" will count both TEXT values 1 and numeric values 1.

    However, the logical test: COUNTIFS(Sheet1!$B$2:$B$99999,">1" will only count NUMERIC values >1.

    Maybe you can get around the problem using this:

    COUNTIFS(Sheet1!$B$2:$B$99999,"<>1",
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Countifs not working with greater than (>1)

    You could also utilize some reverse logic...

    If the cells only contain values of 1 through 10
    And you already have a formula that counts the 1's
    Then logic says the remaining cells therefor must be 2 to 10 (greater than 1)

    So say A1 contains your formula that counts the 1's.
    Then to get the >1 you simply need to count ALL of them (regarldess if 1 or 2 or 3 etc..) and subtract A1.

    =SUM(COUNTIFS(Sheet1!$C$2:$C$99999,Sheet2!C24,Sheet1!$F$2:$F$99999,Sheet2!$A$1,Sheet1!$J$2:$J$99999,Sheet2!$A$12),COUNTIFS(Sheet1!$C$2:$C$99999,Sheet2!C24,Sheet1!$F$2:$F$99999,Sheet2!$A$1,Sheet1!$J$2:$J$99999,Sheet2!$A$14))-A1

  4. #4
    Registered User
    Join Date
    06-29-2016
    Location
    Doncaster england
    MS-Off Ver
    2010
    Posts
    2

    Lightbulb

    It's OK I went to go for coffee and logic hit me me like a slap in the face

    Thanks for replying to a stupid question tho. I just got stuck on a one way path I guess.

    Would still be intrested to know why it didn't work tho I have already tried "<>1" that just returned the total.

    Will tidy the formula up tomorrow good job it was only a proof of concept

+ 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. Replies: 3
    Last Post: 08-18-2016, 05:26 PM
  2. countifs not working
    By superchew in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-02-2016, 04:48 PM
  3. [SOLVED] Countifs - Dates greater than.
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-15-2015, 06:20 PM
  4. [SOLVED] Using greater than or less than today as a criteria in a countifs
    By santanicopandimonium in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-05-2014, 02:48 AM
  5. [SOLVED] countifs working on extended ranges and different sheets not working
    By etaf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 02:23 PM
  6. Help With COUNTIFS Using Greater Than Criteria
    By amerain in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-04-2013, 11:31 AM
  7. COUNTIFS not working
    By nosenga in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2011, 04:38 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