+ Reply to Thread
Results 1 to 42 of 42

Retrieving Unique Values From A List - TIP

  1. #1
    Registered User
    Join Date
    05-03-2004
    Posts
    3

    Retrieving Unique Values From A List - TIP

    I received an email yesterday regarding the above topic and I have a spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that this would be a cool way to see what distinct names are listed within the column of names.
    I entered the following into the =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field B2.
    Column A has a sample of names from A1 to A150
    Column B, Row 1 is blank
    Column B, Row 2 has this function. I copied the formula down to B150, of course when I do so, the formula changes ($B$1:B2, ...). All the fields in the Column B have the #N/A value.
    I know that there are duplicate rows of data in Column A.
    So what is wrong?

    dw

  2. #2
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479
    Quote Originally Posted by ddwebb
    I received an email yesterday regarding the above topic and I have a spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that this would be a cool way to see what distinct names are listed within the column of names.
    I entered the following into the =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field B2.
    Column A has a sample of names from A1 to A150
    Column B, Row 1 is blank
    Column B, Row 2 has this function. I copied the formula down to B150, of course when I do so, the formula changes ($B$1:B2, ...). All the fields in the Column B have the #N/A value.
    I know that there are duplicate rows of data in Column A.
    So what is wrong?

    dw
    Hi ddwebb

    Try this

    =IF(COUNTIF($A$1:$A$10,B1)=0,"No Match","Match")
    Paul

  3. #3
    Registered User
    Join Date
    05-03-2004
    Posts
    3

    Nope, did not work

    I tried that and that did not work.

    What the Excel Tip e-mail was:
    Problem:
    Column A contains a list of values, each of which may appear more than once.
    We want to create a list in column B in which each value from column A may only appear once.

    Solution:

    Use the INDEX, MATCH, and COUNTIF functions as shown in the following Array formula:
    {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}

    Note:
    The first cell in the unique list (column B) must remain empty.
    The formula should be entered in the second cell and copied down until the #N/A error is returned.


    List_________Distinct List
    Red
    Blue_________Red
    Green________Blue
    Yellow_______Green
    Green________Yellow
    Blue_________#N/A
    Blue

    I have tried this in a separate worksheet to experiment and it does not work for me. Using Excel 2002.
    dw

  4. #4
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  5. #5
    Registered User
    Join Date
    05-03-2004
    Posts
    3

    Thanks

    I wanted a little more than Duplicate or unique. The original formula ws to return the distinct values or duplicate values from column A.

    I finally got it to work. what I did not know was that after entering the original formula: =INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B4,$A$2:$A$8),0))
    I was to press the SHIFT+CTRL+ENTER keys to make this an array and then copy the formula down to B150.
    This now shows all the Unique values in Column A displayed in Column B.
    Just one tiny step that the ExcelTip e-mail did not provide and I did not know.
    Thanks
    dw

  6. #6
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  7. #7
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  8. #8
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  9. #9
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  10. #10
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  11. #11
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  12. #12
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  13. #13
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  14. #14
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  15. #15
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  16. #16
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  17. #17
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  18. #18
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  19. #19
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  20. #20
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  21. #21
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  22. #22
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  23. #23
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  24. #24
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  25. #25
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  26. #26
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  27. #27
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  28. #28
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  29. #29
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  30. #30
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  31. #31
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  32. #32
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  33. #33
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  34. #34
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  35. #35
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  36. #36
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  37. #37
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  38. #38
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  39. #39
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  40. #40
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  41. #41
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    dw,

    In cell B2, use the formula
    =IF(COUNTIF($A$1:A2,A2)=1,"Unique","Duplicate")
    and copy down.

    The second, third, etc. instances of dupes will have "Duplicate".

    IF you want the FIRST instance of dupes to also have "Duplicate", then use:

    =IF(COUNTIF($A$1:$A$150,A2)=1,"Unique","Duplicate")

    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I received an email yesterday regarding the above topic and I have a
    > spreadsheet that has hundreds of names (i.e. Doe, J) and I thought that
    > this would be a cool way to see what distinct names are listed within
    > the column of names.
    > I entered the following into the
    > =INDEX($A$1:$A$150,MATCH(0,COUNTIF($B$1:B1,$A$1:$A$150),0)) in field
    > B2.
    > Column A has a sample of names from A1 to A150
    > Column B, Row 1 is blank
    > Column B, Row 2 has this function. I copied the formula down to B150,
    > of course when I do so, the formula changes ($B$1:B2, ...). All the
    > fields in the Column B have the #N/A value.
    > I know that there are duplicate rows of data in Column A.
    > So what is wrong?
    >
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




  42. #42
    Bernie Deitrick
    Guest

    Re: Retrieving Unique Values From A List - TIP

    Use this in cell B2, and copy down:

    =IF(COUNTIF($A$1:A2,A2)=1,A2,"")


    --
    HTH,
    Bernie
    MS Excel MVP


    "ddwebb" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I tried that and that did not work.
    >
    > What the Excel Tip e-mail was:
    > Problem:
    > Column A contains a list of values, each of which may appear more than
    > once.
    > We want to create a list in column B in which each value from column A
    > may only appear once.
    >
    > Solution:
    >
    > Use the INDEX, MATCH, and COUNTIF functions as shown in the following
    > Array formula:
    > {=INDEX($A$2:$A$8,MATCH(0,COUNTIF($B$2:B2,$A$2:$A$8),0))}
    >
    > Note:
    > The first cell in the unique list (column B) must remain empty.
    > The formula should be entered in the second cell and copied down until
    > the #N/A error is returned.
    >
    >
    > List_________Distinct List
    > Red
    > Blue_________Red
    > Green________Blue
    > Yellow_______Green
    > Green________Yellow
    > Blue_________#N/A
    > Blue
    >
    > I have tried this in a separate worksheet to experiment and it does not
    > work for me. Using Excel 2002.
    > dw
    >
    >
    > --
    > ddwebb
    > ------------------------------------------------------------------------
    > ddwebb's Profile: http://www.excelforum.com/member.php...fo&userid=9057
    > View this thread: http://www.excelforum.com/showthread...hreadid=399145
    >




+ 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