+ Reply to Thread
Results 1 to 2 of 2

Distinct Values

  1. #1
    Registered User
    Join Date
    01-26-2007
    Location
    Sacramento, CA
    Posts
    1

    Distinct Values

    Hey All,

    I have the code below which parses through about 16000 rows with 3 columns. ID/COUNTY/STATE

    It output in an adjacent column each ID then each county(s) they are associated with.

    Output is ID in Column E and the in Column F, eash STATE.COUNTY seperated by commas..

    example:

    222 CA.SACRAMENTO, CA.LOS ANGELES, CA.SAN DIEGO
    235 NY.SUFFOLK
    242 AK.ANCHORAGE

    etc..

    But for some IDs they have multiple identical STATE.COUNTY data, and I cannot figure out how to retreive only DISTINCT(UNIQUE) STATE.COUNTY values.

    example:

    221 CA.LOS ANGELES, CA.LOS ANGELES, CA.LOS ANGELES, CA.LOS ANGELES

    I would want only:

    221 CA.LOS ANGELES

    Please Login or Register  to view this content.
    Hopefully that all makes sense..

    Thanks in advance for any help!

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    Try looking at this example: http://www.j-walk.com/ss/excel/tips/tip47.htm

    Although the example is most famously used for getting unique items into a combo or list box, I have used this in many, many, many different situations to extract a unique collection of text items.

    Hope it helps.

+ 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