+ Reply to Thread
Results 1 to 7 of 7

COUNTIF not working consistently

  1. #1
    Forum Contributor
    Join Date
    08-03-2009
    Location
    Cary, NC
    MS-Off Ver
    Excel 2016
    Posts
    109

    COUNTIF not working consistently

    I have 2 reports from 2 different sources. Both reports have the value: sa463w. Report A has it in column A and Report B has it in column B. When I do a COUNTIF on range column A in Report A it returns a 1. When I do it in Report B on range column B it returns a 0. If I copy the value from Report A to Report B THEN Report B COUNTIF returns a 1. Does this have something to do with data types? What do I have to do with Report B to make COUNTIF work like it does in Report A?
    Last edited by bishoposiris; 02-22-2014 at 11:00 AM. Reason: Solved

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: COUNTIF not working consistently

    Check for spaces at the end of the string in report B. Countif looks for an exact match - if your cell actually contains "sa463w " instead of "sa463w" then it won't count it, even though they look the same.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    08-03-2009
    Location
    Cary, NC
    MS-Off Ver
    Excel 2016
    Posts
    109

    Re: COUNTIF not working consistently

    That was it! Report B's values all have spaces after. How can I get around that? Use a wildcard?

  4. #4
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: COUNTIF not working consistently

    Upload your file for quick answer.

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: COUNTIF not working consistently

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

  6. #6
    Forum Contributor
    Join Date
    08-03-2009
    Location
    Cary, NC
    MS-Off Ver
    Excel 2016
    Posts
    109

    Re: COUNTIF not working consistently

    Problem solved! I used:

    Please Login or Register  to view this content.
    and it's working now. Thank you!

  7. #7
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: COUNTIF not working consistently

    Glad it's solved - thanks for the feedback

+ 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] *COUNTIF with nested AND/OR -- not consistently working
    By RandomRed in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2014, 10:26 AM
  2. [SOLVED] VLookup not working consistently
    By pjw23 in forum Excel General
    Replies: 2
    Last Post: 04-27-2012, 03:45 PM
  3. 24 hour time not working in formula consistently
    By snake in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 12:52 PM
  4. Sumproduct Formula Not Working Consistently - Date Issue
    By gav0101 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-19-2008, 10:30 AM
  5. Conditional Formatting Not Working Consistently
    By Christina in forum Excel General
    Replies: 6
    Last Post: 07-22-2005, 07:05 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