+ Reply to Thread
Results 1 to 4 of 4

Creating a list and removing duplicates

  1. #1
    Registered User
    Join Date
    01-06-2006
    Location
    Omaha, NE
    Posts
    31

    Creating a list and removing duplicates

    In column A is a list of case #'s. In Column B is a list of employees and in column C is a list of activities. See below

    123 Joe Run
    321 Ben Jump
    123 Tom Sit
    123 Ben Run
    123 Joe Walk
    321 Joe Run

    In column A, cases numbers may be entered multiple times.

    In column B, employees may be entered multiple times on the same cases or on different cases.

    In column C, activities may be entered multiple times on the same cases or on different cases.

    What I am trying to do is once the cases, employees and activities have been entered, I want to have a list auto generated that will remove the duplicates from the list. I want to query the user for a case number and when they enter it, I only want to see an activity once (remove display of the same activities for that case #).

    for example, if the user inputs case # 123, I want the following return from the array above:

    Run
    Sit
    Walk

    Any help would be great as I am stuck. Thanks!

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Use Data Filter AdvancedFilter Unique Records ...
    see attached ...
    Attached Files Attached Files
    HTH
    Carim


    Top Excel Links

  3. #3
    Forum Contributor
    Join Date
    10-14-2004
    Location
    San Diego, CA
    Posts
    213
    Hello JohnGuts:

    Assuming your data is in the range A1:C6, type a case number in cell G1. Paste this formula in cell D1 and copy it down.

    =IF(G$1=A1,C1,"")

    Paste this formula in cell E1 and copy down.

    =IF(D1="","",IF(COUNTIF(D$1:D1,D1)>1,"",COUNTIF(D:D,"<"&D1)+ROW()/100000))

    Paste this formula in cell F1 and copy down.

    =IF(ISERR(SMALL(E:E,ROW(1:1))),"",OFFSET(D$1,MID(SMALL(E:E,ROW(1:1)),FIND(".",SMALL(E:E,ROW(1:1))),6)*100000-1,0))

    Hide columns D and E.


    Matt

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211
    Quote Originally Posted by JohnGuts
    In column A is a list of case #'s. In Column B is a list of employees and in column C is a list of activities. See below

    123 Joe Run
    321 Ben Jump
    123 Tom Sit
    123 Ben Run
    123 Joe Walk
    321 Joe Run

    In column A, cases numbers may be entered multiple times.

    In column B, employees may be entered multiple times on the same cases or on different cases.

    In column C, activities may be entered multiple times on the same cases or on different cases.

    What I am trying to do is once the cases, employees and activities have been entered, I want to have a list auto generated that will remove the duplicates from the list. I want to query the user for a case number and when they enter it, I only want to see an activity once (remove display of the same activities for that case #).

    for example, if the user inputs case # 123, I want the following return from the array above:

    Run
    Sit
    Walk

    Any help would be great as I am stuck. Thanks!

    Assuming your data in A2:C7

    =IF(ISERR(SMALL(IF(FREQUENCY(IF($A$2:$A$7=123,MATCH($C$2:$C$7,$C$2:$C$7,0)),MATCH($C$2:$C$7,$C$2:$C$7,0)),ROW(INDIRECT("1:"&ROWS($C$2:$C$7)))),ROWS($2:2))),"",INDEX($C$2:$C$7,SMALL(IF(FREQUENCY(IF($A$2:$A$7=123,MATCH($C$2:$C$7,$C$2:$C$7,0)),MATCH($C$2:$C$7,$C$2:$C$7,0)),ROW(INDIRECT("1:"&ROWS($C$2:$C$7)))),ROWS($1:2))))

    ctrl+shift+enter, not just enter
    Last edited by Teethless mama; 02-17-2007 at 03:02 PM.

+ 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