+ Reply to Thread
Results 1 to 4 of 4

COUNTIF showing matches that don't really match

  1. #1
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,759

    COUNTIF showing matches that don't really match

    I am helping to solve this thread: https://www.excelforum.com/excel-for...ml#post4901325

    There is an oddity in here that I have boiled down to the attached file. There are values that consist of strings of 19 digits, prefaced with ' to indicate they are text. COUNTIF is considering two strings to match but they are totally different.

    My educated guess is that COUNTIF is looking at these strings as if they were integers, and lopping off the precision that is not supported by Excel (Excel maintains only the most significant 15 digits). When I change the 15th digit, COUNTIF no longer finds a match.

    The point of this exercise is to find duplicates in the list, but Excel is showing false duplicates. Looking for a way to find true duplicates.
    Attached Files Attached Files
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: COUNTIF showing matches that don't really match

    I tried a suggestion trimming the 1st 4 digits
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,759

    Re: COUNTIF showing matches that don't really match

    That suggestion may resolve the original question, but why does COUNTIF insist that these are numbers even though they are entered as text?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,732

    Re: COUNTIF showing matches that don't really match

    See here ..

    https://exceljet.net/formula/count-l...ithout-countif

    in B3


    =SUMPRODUCT(--($A$2:$A3=A3))

+ 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. INDEX MATCH MATCH and return MAX value of multiple matches
    By njm0059 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-24-2018, 05:29 PM
  2. countif when date matches in 2 columns
    By rodgerdooter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2018, 08:51 AM
  3. [SOLVED] Searching for text matches and showing results in ComboBox
    By tonygg9 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-13-2014, 09:58 AM
  4. [SOLVED] INDEX MATCH array formula that matches substring n gives multiple matches
    By bkwins in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-12-2013, 04:57 AM
  5. Replies: 7
    Last Post: 04-11-2013, 12:46 AM
  6. [SOLVED] countif both criteria matches
    By HayleyH86 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-22-2013, 07:19 PM
  7. Replies: 4
    Last Post: 07-18-2012, 02:34 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