+ Reply to Thread
Results 1 to 3 of 3

Countifs giving me strange results

  1. #1
    Forum Contributor
    Join Date
    11-22-2020
    Location
    Sydney Australia
    MS-Off Ver
    365
    Posts
    202

    Countifs giving me strange results

    Hi All,

    In the attached spreadsheet, I have:

    Col A - a series of numerical values
    Col B - a mixture of numeric & string values

    Cell D3 has the formula = COUNTIF(A2:A25,"<=23") -> which gives a result of 7 which is correct
    Cell E3 has the formula = COUNTIF(B2:B25,"x") -> which gives a result of 3 which is correct
    Cell F4 has the formula = COUNTIFS(A2:A25,"<=23",B2:B25,"x") -> which gives a result of 2 which is correct

    However, if I change the fixed criteria to cell reference criteria, it all falls apart.

    So, if I put the value of 23 in cell D6 then, when "<=23" is replaced with "<=D6" -> I get a result of 16.

    Can anybody please give me an idea / correction to what I am doing wrong?

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,099

    Re: Countifs giving me strange results

    Try =COUNTIF(A2:A25,"<="&D6)

  3. #3
    Forum Contributor
    Join Date
    11-22-2020
    Location
    Sydney Australia
    MS-Off Ver
    365
    Posts
    202

    Re: Countifs giving me strange results

    Well that makes a lot more sence.

    Cant believe Imissed the obvious.

    Thanks.

+ 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. TEXT date function giving strange results
    By QSGuy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-16-2019, 06:01 PM
  2. [SOLVED] Index/match giving correct results, wrong results & #N/A results...sometimes
    By mrteater in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-27-2019, 10:41 AM
  3. [SOLVED] COUNTIFS formula giving two different results
    By HKPHOOY in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2018, 08:32 AM
  4. [SOLVED] NextRow VBA giving strange result...
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-09-2017, 06:05 AM
  5. Replies: 8
    Last Post: 06-07-2016, 11:28 AM
  6. XIRR giving strange answers
    By jd354 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2013, 10:50 PM
  7. Macro worked for 2 years, suddenly started giving strange results
    By dylanemcgregor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2009, 04:39 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