+ Reply to Thread
Results 1 to 10 of 10

Uniue Values from 2 colums - Formula

  1. #1
    Registered User
    Join Date
    05-03-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    4

    Uniue Values from 2 colums - Formula

    I am trying to determine the amount of days an employee has been at work. The employee's name & date can occur multiple times in the list of data. I would imagine you would need to find the unique number of occurences from a concatination between the 2 but that's not working for me.
    I would really appreciate it if i could use the formula for each employee...
    that way i could just copy the formula and reference the person's name.

    EG. Uniue days where employee name = "Rich Armstrong" (Answer should be 3)
    Uniue days where employee name = "Luke Siedle" (Answer should be 2)

    Here's the data...

    Date Name
    2011/04/01 Rich Armstrong
    2011/04/01 Luke Siedle
    2011/04/01 Rich Armstrong
    2011/04/01 Rich Armstrong
    2011/04/01 Rich Armstrong
    2011/04/01 Rich Armstrong
    2011/04/01 Luke Siedle
    2011/04/01 Luke Siedle
    2011/04/01 Luke Siedle
    2011/04/01 Luke Siedle
    2011/04/01 Luke Siedle
    2011/04/04 Rich Armstrong
    2011/04/04 Rich Armstrong
    2011/04/04 Rich Armstrong
    2011/04/04 Rich Armstrong
    2011/04/04 Rich Armstrong
    2011/04/04 Rich Armstrong
    2011/04/04 Luke Siedle
    2011/04/04 Luke Siedle
    2011/04/04 Luke Siedle
    2011/04/04 Luke Siedle
    2011/04/05 Rich Armstrong
    2011/04/05 Rich Armstrong
    2011/04/05 Rich Armstrong
    Last edited by NBVC; 05-17-2011 at 01:16 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Uniue Values from 2 colums - Formula

    Assuming your data is in A2:B25 and your lookup criteria is in E2, try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down if desired to get more name counts.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Uniue Values from 2 colums - Formula

    Add a header row

    Suggest type =A2& "|" & B2 into C2 and copy down.

    Copy column C and paste special - values into column E.

    Copy E1 to G1

    Select column E and Data-Filter - Advanced Filter. Specify column E as the list range, G1:G2 as criteria, I1 as copy to and tick unique records only.

    Unique set of reords will appear in column I.
    Martin

  4. #4
    Registered User
    Join Date
    05-03-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    4

    Exclamation Re: Uniue Values from 2 colums - Formula

    Quote Originally Posted by NBVC View Post
    Assuming your data is in A2:B25 and your lookup criteria is in E2, try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down if desired to get more name counts.
    Unfortunately this dropped me an error in my Excel 2010 and I can't detect what it is...but it's def what I am looking for regarding the logic it's trying to achieve...

    What's your thoughts on this?

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Uniue Values from 2 colums - Formula

    It should work in xl2010 too. Did you confirm the formula with the CTRL and Shift keys and then Enter.

  6. #6
    Registered User
    Join Date
    05-03-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Uniue Values from 2 colums - Formula

    I did indeed...

    Here's a screen shot of what it gave me...(see attached) hope this helps.
    Attached Images Attached Images

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Uniue Values from 2 colums - Formula

    Perhaps your version of Excel requires argument separators to be semi colons instead of commas. Try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER

  8. #8
    Forum Contributor
    Join Date
    05-04-2009
    Location
    ME
    MS-Off Ver
    Excel 2003,2007
    Posts
    157

    Re: Uniue Values from 2 colums - Formula

    Hopefully it may work too...

    =SUM(IF(FREQUENCY(IF(B2:B25=E2,IF(A2:A25<>"",MATCH(A2:A25,A2:A25,0))),ROW(A2:A25)),1))

    (confirmed with CTRL+SHIFT+ENTER)

  9. #9
    Registered User
    Join Date
    05-03-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    4

    Smile Re: Uniue Values from 2 colums - Formula

    Quote Originally Posted by NBVC View Post
    Perhaps your version of Excel requires argument separators to be semi colons instead of commas. Try:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER
    Worked like a charm!!!

    Turns out I needed to use commas instead of semi-colons...not sure why that is. Thanks so much for your help!!

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Uniue Values from 2 colums - Formula

    Please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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