+ Reply to Thread
Results 1 to 3 of 3

COUNTIF with text fields

  1. #1
    JimNC
    Guest

    COUNTIF with text fields

    I have two list, A & B. B is a fixed list with the acceptable entries for
    list A. List A items must be found in list B and there can be no duplicates
    in list A.

    Both lists are format as text and include entries such as "7", "07" which
    should be recognized as not equal. COUNTIF returns a count of "2" for these
    values.

    Desired
    Invalid entries in A return "0"
    One valid entry returns a "1"
    Two equal entries in List A return "2"
    Three equal entries in List A return "3" etc.


    Jim /*

    WebApp Hosting
    http://www.advanceddesignsinc.com/Web%20Hosting.htm



  2. #2
    Bob Phillips
    Guest

    Re: COUNTIF with text fields

    Jim,

    Try this instead of COUNTIF

    =SUMPRODUCT(--($A$1:$A$100=A1),--(LEN($A$1:$A$100)=LEN(A1)))

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "JimNC" <[email protected]> wrote in message
    news:[email protected]...
    > I have two list, A & B. B is a fixed list with the acceptable entries for
    > list A. List A items must be found in list B and there can be no

    duplicates
    > in list A.
    >
    > Both lists are format as text and include entries such as "7", "07" which
    > should be recognized as not equal. COUNTIF returns a count of "2" for

    these
    > values.
    >
    > Desired
    > Invalid entries in A return "0"
    > One valid entry returns a "1"
    > Two equal entries in List A return "2"
    > Three equal entries in List A return "3" etc.
    >
    >
    > Jim /*
    >
    > WebApp Hosting
    > http://www.advanceddesignsinc.com/Web%20Hosting.htm
    >
    >




  3. #3
    JimNC
    Guest

    Re: COUNTIF with text fields

    It works for valid entries, but not invalid entries. I found a solution by
    using Countif in one column and lookup in adjacent column.

    Jim /*



    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > Jim,
    >
    > Try this instead of COUNTIF
    >
    > =SUMPRODUCT(--($A$1:$A$100=A1),--(LEN($A$1:$A$100)=LEN(A1)))
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "JimNC" <[email protected]> wrote in message
    > news:[email protected]...
    >> I have two list, A & B. B is a fixed list with the acceptable entries for
    >> list A. List A items must be found in list B and there can be no

    > duplicates
    >> in list A.
    >>
    >> Both lists are format as text and include entries such as "7", "07" which
    >> should be recognized as not equal. COUNTIF returns a count of "2" for

    > these
    >> values.
    >>
    >> Desired
    >> Invalid entries in A return "0"
    >> One valid entry returns a "1"
    >> Two equal entries in List A return "2"
    >> Three equal entries in List A return "3" etc.
    >>
    >>
    >> Jim /*
    >>
    >> WebApp Hosting
    >> http://www.advanceddesignsinc.com/Web%20Hosting.htm
    >>
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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