+ Reply to Thread
Results 1 to 2 of 2

Formula to check unique values based on data from 2 columns

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Maharashtra, India
    MS-Off Ver
    Excel 2007
    Posts
    1

    Post Formula to check unique values based on data from 2 columns

    Hi, I'm trying to make a list as below. It has 3 columns Sr. No. Employee id and Name. Employee ID is looked up from another file and when Employee Name is entered, the employee ID from the list is displayed in the column. If the employee is new, then NEW is mentioned under employee ID.

    We have several departments and employees may be shifted from one department to another and as such same employee name may appear more than once in the sheet.

    What I am trying to do is get a summary of the NEW members (UNIQUE LIST) each month displayed at the end.
    Currently I am using Countif function but this is not giving the desired results as there is duplication of names (as you can see from the below, it is not working properly and duplicates are also being counted together.)

    Please advise a suitable solution. Many thanks


    Sr. No. Emp. Id Name
    Section1 - Primary
    1 25 John
    2 57 Bradley
    3 85 Mike
    4 97 Tom
    Section2 - Secondary
    1 85 Mike
    2 67 Hulk
    3 99 Dram
    4 154 Sman
    5 NEW Salman
    6 25 John
    7 NEW Paris
    Section3 - Junior
    1 67 Hulk
    2 NEW Salman
    3 NEW Paris
    4 99 Dram
    NEW 4

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula to check unique values based on data from 2 columns

    this should work
    =SUMPRODUCT(--IF(FREQUENCY(MATCH(C2:C19,C2:C19,0),MATCH(C2:C19,C2:C19,0))>0,1),--(B1:B19="new"))
    note the red bit has to be one cell greater than C2:C19 since b1 isnt used in the calculation it is ignored any way
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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