+ Reply to Thread
Results 1 to 2 of 2

How assing unique number in a column based on a combination of two cells

  1. #1
    Registered User
    Join Date
    04-22-2004
    Posts
    1

    How assing unique number in a column based on a combination of two cells

    Hi,

    I have a spreadsheet with two columns. Here is an example:

    Toronto Missisauga
    Toronto North York
    Toronto East York

    Here I want the third column to assign 1 in all combinations where Toronto is first. Now further down I will have

    Missisauga Toronto
    Missisauga Brampton
    Missisauga Etobikoke

    I would like Missisauga - Toronto to remain 1 in hte third column, but for the other two a new number to be assigned.

    I hope this is clear. The process shouldn't be very complicated. It can do it one at the time so I can pick thenumbers to be assigned.

    Thank you

  2. #2
    John Pritchard
    Guest

    RE: How assing unique number in a column based on a combination of two

    Hi there,

    Not quite sure what you're after. But here's a formula to place in column 3
    that will make column 3 contain a 1 when Toronto appears in either column A
    or B.

    =IF(OR(A1 ="Toronto", B1 = "Toronto"),1,0)

    Are you trying to give all combinations a unique number no matter what order
    they appear in ? Or maybe anything with Toronto gets a 1 then the next name
    to appear in column A gets a 2 etc - so in your example column C would run
    1,1,1,1 (by virtue of the fact that Toronto appear),2 ( for Missisauga) ,2 ?
    "galin" wrote:

    >
    > Hi,
    >
    > I have a spreadsheet with two columns. Here is an example:
    >
    > Toronto Missisauga
    > Toronto North York
    > Toronto East York
    >
    > Here I want the third column to assign 1 in all combinations where
    > Toronto is first. Now further down I will have
    >
    > Missisauga Toronto
    > Missisauga Brampton
    > Missisauga Etobikoke
    >
    > I would like Missisauga - Toronto to remain 1 in hte third column, but
    > for the other two a new number to be assigned.
    >
    > I hope this is clear. The process shouldn't be very complicated. It can
    > do it one at the time so I can pick thenumbers to be assigned.
    >
    > Thank you
    >
    >
    > --
    > galin
    > ------------------------------------------------------------------------
    > galin's Profile: http://www.excelforum.com/member.php...fo&userid=8646
    > View this thread: http://www.excelforum.com/showthread...hreadid=507239
    >
    >


+ 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