Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default IF Then using a column of text and assigning a number to text

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default IF Then using a column of text and assigning a number to text

=MATCH(A2,{"orange","apple","pear","banana"},0)

and copy down.

--
__________________________________
HTH

Bob

"Dan" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default IF Then using a column of text and assigning a number to text

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
"Bob Phillips" wrote:

=MATCH(A2,{"orange","apple","pear","banana"},0)

and copy down.

--
__________________________________
HTH

Bob

"Dan" wrote in message
...
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.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default IF Then using a column of text and assigning a number to text

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


On Wed, 20 Aug 2008 12:25:02 -0700, Dan
wrote:

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.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default IF Then using a column of text and assigning a number to text

You need the ,0 at the end as I showed.

--
__________________________________
HTH

Bob

"Dan" wrote in message
...
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
"Bob Phillips" wrote:

=MATCH(A2,{"orange","apple","pear","banana"},0)

and copy down.

--
__________________________________
HTH

Bob

"Dan" wrote in message
...
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.








  #6   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default IF Then using a column of text and assigning a number to text

Thanks Gord

"Gord Dibben" wrote:

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


On Wed, 20 Aug 2008 12:25:02 -0700, Dan
wrote:

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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning a number value to text SoupNazi Excel Worksheet Functions 6 April 22nd 23 06:12 AM
Assigning numerical value to text Dave Excel Worksheet Functions 11 February 1st 07 02:21 AM
Counting a mixed text/number column based on text in another colum Sierra Vista Steve Excel Discussion (Misc queries) 3 December 17th 06 05:30 PM
Assigning number values to text strings [email protected] Excel Discussion (Misc queries) 0 December 8th 06 09:52 PM
how do I count the number of times text in column A matches text i Sheila Excel Worksheet Functions 2 November 16th 05 10:20 PM


All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"