+ Reply to Thread
Results 1 to 5 of 5

Counting Unique text entries in a sheet with a condition

  1. #1
    Mike
    Guest

    Counting Unique text entries in a sheet with a condition

    I have a list of names with mutiple entries for most of them
    I need to count the unique names but that only meet another criteria

    eg
    A B
    Uk Mike
    DE Fred
    Uk Mike
    Ch Ted
    Uk Rose

    What I need is a formulae that will let me specify if colulm A is UK count
    the unique names in colum B - the answer should be 2 (Mike & Rose are in UK)

    Thanks

  2. #2
    Bob Phillips
    Guest

    Re: Counting Unique text entries in a sheet with a condition

    Hi Mike,

    Try this

    =SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<>""))

    --
    HTH

    Bob Phillips

    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    > I have a list of names with mutiple entries for most of them
    > I need to count the unique names but that only meet another criteria
    >
    > eg
    > A B
    > Uk Mike
    > DE Fred
    > Uk Mike
    > Ch Ted
    > Uk Rose
    >
    > What I need is a formulae that will let me specify if colulm A is UK count
    > the unique names in colum B - the answer should be 2 (Mike & Rose are in

    UK)
    >
    > Thanks




  3. #3
    Mike
    Guest

    Re: Counting Unique text entries in a sheet with a condition

    Bob
    Thank you so much - your a top man - did the trick I was messing with
    FREQUENCY & MATCH functions which were driving me crazy.

    Can I add more than one Criteria eg UK and maybe another coloum criteria?

    Thanks
    Mike

    "Bob Phillips" wrote:

    > Hi Mike,
    >
    > Try this
    >
    > =SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<>""))
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > "Mike" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have a list of names with mutiple entries for most of them
    > > I need to count the unique names but that only meet another criteria
    > >
    > > eg
    > > A B
    > > Uk Mike
    > > DE Fred
    > > Uk Mike
    > > Ch Ted
    > > Uk Rose
    > >
    > > What I need is a formulae that will let me specify if colulm A is UK count
    > > the unique names in colum B - the answer should be 2 (Mike & Rose are in

    > UK)
    > >
    > > Thanks

    >
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: Counting Unique text entries in a sheet with a condition

    It can be done with Frequency and Match

    =COUNT(1/FREQUENCY(IF((A1:A100="UK")*(B1:B100<>""),MATCH(B1:B100,B1:B100,0))
    ,ROW(INDEX(B1:B100,0,0))-ROW(B1)+1))

    which as an array formula is committed with Ctrl-Shift-Enter, but the
    SUMPRODUCT is easier.

    For more conditions, you just add it to the first part, like so

    =SUMPRODUCT((A1:A100="UK")*(C1:C100="other
    value")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<>""))

    Regards

    Bob

    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    > Bob
    > Thank you so much - your a top man - did the trick I was messing with
    > FREQUENCY & MATCH functions which were driving me crazy.
    >
    > Can I add more than one Criteria eg UK and maybe another coloum criteria?
    >
    > Thanks
    > Mike
    >
    > "Bob Phillips" wrote:
    >
    > > Hi Mike,
    > >
    > > Try this
    > >
    > > =SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<>""))
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > "Mike" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I have a list of names with mutiple entries for most of them
    > > > I need to count the unique names but that only meet another criteria
    > > >
    > > > eg
    > > > A B
    > > > Uk Mike
    > > > DE Fred
    > > > Uk Mike
    > > > Ch Ted
    > > > Uk Rose
    > > >
    > > > What I need is a formulae that will let me specify if colulm A is UK

    count
    > > > the unique names in colum B - the answer should be 2 (Mike & Rose are

    in
    > > UK)
    > > >
    > > > Thanks

    > >
    > >
    > >




  5. #5
    Mike
    Guest

    Re: Counting Unique text entries in a sheet with a condition

    Thank you Bob Very helpful
    Mike

    "Bob Phillips" wrote:

    > It can be done with Frequency and Match
    >
    > =COUNT(1/FREQUENCY(IF((A1:A100="UK")*(B1:B100<>""),MATCH(B1:B100,B1:B100,0))
    > ,ROW(INDEX(B1:B100,0,0))-ROW(B1)+1))
    >
    > which as an array formula is committed with Ctrl-Shift-Enter, but the
    > SUMPRODUCT is easier.
    >
    > For more conditions, you just add it to the first part, like so
    >
    > =SUMPRODUCT((A1:A100="UK")*(C1:C100="other
    > value")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<>""))
    >
    > Regards
    >
    > Bob
    >
    > "Mike" <[email protected]> wrote in message
    > news:[email protected]...
    > > Bob
    > > Thank you so much - your a top man - did the trick I was messing with
    > > FREQUENCY & MATCH functions which were driving me crazy.
    > >
    > > Can I add more than one Criteria eg UK and maybe another coloum criteria?
    > >
    > > Thanks
    > > Mike
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > Hi Mike,
    > > >
    > > > Try this
    > > >
    > > > =SUMPRODUCT((A1:A100="UK")/COUNTIF(B1:B100,B1:B100&"")*(B1:B100<>""))
    > > >
    > > > --
    > > > HTH
    > > >
    > > > Bob Phillips
    > > >
    > > > "Mike" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > I have a list of names with mutiple entries for most of them
    > > > > I need to count the unique names but that only meet another criteria
    > > > >
    > > > > eg
    > > > > A B
    > > > > Uk Mike
    > > > > DE Fred
    > > > > Uk Mike
    > > > > Ch Ted
    > > > > Uk Rose
    > > > >
    > > > > What I need is a formulae that will let me specify if colulm A is UK

    > count
    > > > > the unique names in colum B - the answer should be 2 (Mike & Rose are

    > in
    > > > UK)
    > > > >
    > > > > Thanks
    > > >
    > > >
    > > >

    >
    >
    >


+ 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