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

G

galin

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
 
J

John Pritchard

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top