+ Reply to Thread
Results 1 to 5 of 5

Assigning numbers to a like items

  1. #1
    Registered User
    Join Date
    11-17-2005
    Posts
    2

    Assigning numbers to a like items

    I have a column of categories like:

    computer
    computer
    computer
    server
    server
    server
    monitor
    monitor
    monitor
    usb
    mouse
    mouse
    mouse

    I want to be able to assign a unique number to each like item.
    (Imagine 100,000 different categories)

    The end results would be:

    1, computer
    1, computer
    1, computer
    2, server
    2, server
    2, server
    3, monitor
    3, monitor
    3, monitor
    4, usb
    5, mouse
    5, mouse
    5, mouse

    Thanks for any help.

  2. #2
    Max
    Guest

    Re: Assigning numbers to a like items

    One play ..

    Assuming source data is in A1 down

    Put:

    In B1: =IF(A1="","",IF(COUNTIF($A$1:A1,A1)>1,"",ROW()))
    In C1: =IF(A1="","",COUNT($B$1:B1))
    In D1: =IF(A1="","",C1&", "&A1)

    Select B1:D1, copy down as far as required

    Col D will return the required results

    Just do an in-place: copy > paste special > values > OK
    on col D to freeze the results, if required
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "woemlavy" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have a column of categories like:
    >
    > computer
    > computer
    > computer
    > server
    > server
    > server
    > monitor
    > monitor
    > monitor
    > usb
    > mouse
    > mouse
    > mouse
    >
    > I want to be able to assign a unique number to each like item.
    > (Imagine 100,000 different categories)
    >
    > The end results would be:
    >
    > 1, computer
    > 1, computer
    > 1, computer
    > 2, server
    > 2, server
    > 2, server
    > 3, monitor
    > 3, monitor
    > 3, monitor
    > 4, usb
    > 5, mouse
    > 5, mouse
    > 5, mouse
    >
    > Thanks for any help.
    >
    >
    > --
    > woemlavy
    > ------------------------------------------------------------------------
    > woemlavy's Profile:

    http://www.excelforum.com/member.php...o&userid=28859
    > View this thread: http://www.excelforum.com/showthread...hreadid=486108
    >




  3. #3
    Registered User
    Join Date
    11-17-2005
    Posts
    2

    Excellent

    This worked great for me.

    Thanks Max!

  4. #4
    Max
    Guest

    Re: Assigning numbers to a like items

    Glad to hear that !
    Thanks for the feedback ..
    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "woemlavy" <[email protected]> wrote in
    message news:[email protected]...
    >
    > This worked great for me.
    >
    > Thanks Max!




  5. #5
    Gary''s Student
    Guest

    RE: Assigning numbers to a like items

    If your data in in colu,mn B, then in A1 put 1 and in A2 put:

    =IF(B2=B1,A1,A1+1) and copy down
    --
    Gary's Student


    "woemlavy" wrote:

    >
    > I have a column of categories like:
    >
    > computer
    > computer
    > computer
    > server
    > server
    > server
    > monitor
    > monitor
    > monitor
    > usb
    > mouse
    > mouse
    > mouse
    >
    > I want to be able to assign a unique number to each like item.
    > (Imagine 100,000 different categories)
    >
    > The end results would be:
    >
    > 1, computer
    > 1, computer
    > 1, computer
    > 2, server
    > 2, server
    > 2, server
    > 3, monitor
    > 3, monitor
    > 3, monitor
    > 4, usb
    > 5, mouse
    > 5, mouse
    > 5, mouse
    >
    > Thanks for any help.
    >
    >
    > --
    > woemlavy
    > ------------------------------------------------------------------------
    > woemlavy's Profile: http://www.excelforum.com/member.php...o&userid=28859
    > View this thread: http://www.excelforum.com/showthread...hreadid=486108
    >
    >


+ 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