ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How assing unique number in a column based on a combination of two cells (https://www.excelbanter.com/excel-programming/352068-how-assing-unique-number-column-based-combination-two-cells.html)

galin

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 wher
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, bu
for the other two a new number to be assigned.

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

Thank yo

--
gali
-----------------------------------------------------------------------
galin's Profile: http://www.excelforum.com/member.php...nfo&userid=864
View this thread: http://www.excelforum.com/showthread.php?threadid=50723


John Pritchard[_3_]

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




All times are GMT +1. The time now is 05:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com