Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I number rows based on unique values in another column? | Excel Worksheet Functions | |||
Isolate UNIQUE combination of Z cells from a range N that adds up | Excel Worksheet Functions | |||
Count Number of Discrete Cells, Based on Another Column | Excel Discussion (Misc queries) | |||
Count number of cells and total in one column, based on another column suffix | Excel Worksheet Functions | |||
macro to transpose cells in Column B based on unique values in Column A | Excel Programming |