IF Then using a column of text and assigning a number to text

D

Dan

I have a column containing text. In that column (200 rows worth) there are
40 different words. I need to know how to do the correct formula to find all
the words that match and then place the number assigned to that word in the
column and row next to that word. i.e. my column contains oranges, apples,
etc orange=1, apples =2, etc. I need to have Excel go through the list and
asssign 1 to oranges 2 to apples, etc.
 
D

Dan

okay well that was what I had but it still just assigns a number that is
totally random
so you are saying
=MATCH(A2,{"orange","apple","pear","banana"......},1,2,3,4.....)

thats doesnt seem to work
 
G

Gord Dibben

On a separate sheet enter a column of words.

In an adjacent column enter a column of corresponding numbers.

On original sheet use VLOOKUP formula with the table range being sheet2
table.

=VLOOKUP(A1,Sheet2!$A$1:$B$40,2,FALSE)

Copy down 200 rows.


Gord Dibben MS Excel MVP
 
D

Dan

Thanks Gord

Gord Dibben said:
On a separate sheet enter a column of words.

In an adjacent column enter a column of corresponding numbers.

On original sheet use VLOOKUP formula with the table range being sheet2
table.

=VLOOKUP(A1,Sheet2!$A$1:$B$40,2,FALSE)

Copy down 200 rows.


Gord Dibben MS Excel MVP
 
Top