+ Reply to Thread
Results 1 to 4 of 4

Countif resulting in wrong results

  1. #1
    Registered User
    Join Date
    04-27-2015
    Location
    UK
    MS-Off Ver
    2007
    Posts
    2

    Countif resulting in wrong results

    Hello

    I'm trying to count whether there is a W in column G only if there is a 1 in column R

    the correct answer is 3

    =SUMPRODUCT((R27:R="1")*(G27:G="W")) results in 0

    =COUNTIF(AND(R27:R="1",G27:G="W")) is NA

    =COUNT(IF(G27:G="W",IF(R27:R="1"))) is 0

    =SUM(IF(R27:R="1",IF(G27:G="W"))) is #Value

    =IF(R27:R="1",COUNTIF(G27:G="W")) is #Value

    =COUNTIFS(R27:R="1", G27:G="W") is 1



    In addition to this once the correct value is found I need to divide it by the number of "1"s in column R
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: Countif resulting in wrong results

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

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

  3. #3
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Countif resulting in wrong results

    To add on to Czeslaw's response, his formulas are correct, but it is only returning a value of 2 because one of your values within column R is stored as text, not a value.

    Please Login or Register  to view this content.
    will pickup the 1 stored with text, but that does not fix the underlying cause of the problem.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  4. #4
    Registered User
    Join Date
    04-27-2015
    Location
    UK
    MS-Off Ver
    2007
    Posts
    2

    Re: Countif resulting in wrong results

    Ah that's ok I'll just shift all that info into notes where it belongs. A collaborative effort is not necessarily an organised one. Thank you, this has been driving me mad.
    Last edited by Krameht; 04-27-2015 at 03:59 PM.

+ 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. [SOLVED] Want all results resulting from index/match
    By snaitaz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2015, 05:57 PM
  2. Retrieving results and FORECAST function - the results are wrong!
    By Lucky_G in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-03-2014, 10:57 AM
  3. COUNTIF giving wrong results
    By Excel_vba in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2013, 04:17 PM
  4. Countif keeps resulting in 0???
    By PPCD in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-12-2012, 05:49 PM
  5. Countif results wrong
    By Markshr in forum Excel General
    Replies: 5
    Last Post: 02-08-2012, 02:56 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