Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Asigning a value to words

I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.

Orange=3

Is this possible
--
Tim
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Asigning a value to words

You could build up a table, eg M1:N5 as follows:

Apple 2
Banana 4
Grape 7
Orange 5
Pear 3

Then in A5 enter:

=IF(A3="","",VLOOKUP(A3,M1:N5,2,0))

Hope this helps.

Pete

On Jul 6, 2:22 pm, Tim wrote:
I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.

Orange=3

Is this possible
--
Tim



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Asigning a value to words

Put this in A5
=IF(A3="Orange",3,"Not Orange")

"Tim" wrote:

I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.

Orange=3

Is this possible
--
Tim

  #4   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Asigning a value to words

Thanks that seems to work but can I tell it to go through the whole sheet and
wherever it sees orange put 3
--
Tim


"Mike" wrote:

Put this in A5
=IF(A3="Orange",3,"Not Orange")

"Tim" wrote:

I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.

Orange=3

Is this possible
--
Tim

  #5   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Asigning a value to words

Thankyou, Once I have built the table how do I make it go through the whole
work sheet. Would I have to copy the formula in all the cells?
--
Tim


"Pete_UK" wrote:

You could build up a table, eg M1:N5 as follows:

Apple 2
Banana 4
Grape 7
Orange 5
Pear 3

Then in A5 enter:

=IF(A3="","",VLOOKUP(A3,M1:N5,2,0))

Hope this helps.

Pete

On Jul 6, 2:22 pm, Tim wrote:
I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.

Orange=3

Is this possible
--
Tim






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Asigning a value to words

How about using a bunch of Edit|Replace's?

Tim wrote:

Thanks that seems to work but can I tell it to go through the whole sheet and
wherever it sees orange put 3
--
Tim

"Mike" wrote:

Put this in A5
=IF(A3="Orange",3,"Not Orange")

"Tim" wrote:

I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.

Orange=3

Is this possible
--
Tim


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Asigning a value to words

Pete, When I place the formula and try to copy into the cell belowA4 the
values of M1:N5 change within the formula so the more I put in the table more
gets missed out as I copy the formula into the sheet, any ideas.
--
Tim


"Pete_UK" wrote:

You could build up a table, eg M1:N5 as follows:

Apple 2
Banana 4
Grape 7
Orange 5
Pear 3

Then in A5 enter:

=IF(A3="","",VLOOKUP(A3,M1:N5,2,0))

Hope this helps.

Pete

On Jul 6, 2:22 pm, Tim wrote:
I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.

Orange=3

Is this possible
--
Tim




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Asigning a value to words

I didn't realise you would be copying it down as you said the word was
in A3 and you wanted the return value to be in A5 (only room for one
more word). Normally you would arrange the words in one column (A) and
put the formula in another column (B), so that you could then copy
down as many as you wish. Change the formula to this:

=IF(A3="","",VLOOKUP(A3,M$1:N$5,2,0))

so now when you copy it down you will always be looking at the same
table (rather than M2:N6, M3:N7 etc as it was before. If you have more
than 5 reference words, so that the table occupies say M1:N35, then
change the formula to:

=IF(A3="","",VLOOKUP(A3,M$1:N$35,2,0))

then copy down.

Hope this helps.

Pete

On Jul 6, 4:28 pm, Tim wrote:
Pete, When I place the formula and try to copy into the cell belowA4 the
values of M1:N5 change within the formula so the more I put in the table more
gets missed out as I copy the formula into the sheet, any ideas.
--
Tim



"Pete_UK" wrote:
You could build up a table, eg M1:N5 as follows:


Apple 2
Banana 4
Grape 7
Orange 5
Pear 3


Then in A5 enter:


=IF(A3="","",VLOOKUP(A3,M1:N5,2,0))


Hope this helps.


Pete


On Jul 6, 2:22 pm, Tim wrote:
I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.


Orange=3


Is this possible
--
Tim- Hide quoted text -


- Show quoted text -



  #9   Report Post  
Posted to microsoft.public.excel.misc
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Asigning a value to words

Cheers worked a treat,
--
Tim


"Pete_UK" wrote:

I didn't realise you would be copying it down as you said the word was
in A3 and you wanted the return value to be in A5 (only room for one
more word). Normally you would arrange the words in one column (A) and
put the formula in another column (B), so that you could then copy
down as many as you wish. Change the formula to this:

=IF(A3="","",VLOOKUP(A3,M$1:N$5,2,0))

so now when you copy it down you will always be looking at the same
table (rather than M2:N6, M3:N7 etc as it was before. If you have more
than 5 reference words, so that the table occupies say M1:N35, then
change the formula to:

=IF(A3="","",VLOOKUP(A3,M$1:N$35,2,0))

then copy down.

Hope this helps.

Pete

On Jul 6, 4:28 pm, Tim wrote:
Pete, When I place the formula and try to copy into the cell belowA4 the
values of M1:N5 change within the formula so the more I put in the table more
gets missed out as I copy the formula into the sheet, any ideas.
--
Tim



"Pete_UK" wrote:
You could build up a table, eg M1:N5 as follows:


Apple 2
Banana 4
Grape 7
Orange 5
Pear 3


Then in A5 enter:


=IF(A3="","",VLOOKUP(A3,M1:N5,2,0))


Hope this helps.


Pete


On Jul 6, 2:22 pm, Tim wrote:
I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.


Orange=3


Is this possible
--
Tim- Hide quoted text -


- Show quoted text -




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Asigning a value to words

The formula will take the word in A3 and convert it to the appropriate
number as specified in the table (and return this value to the cell
where the formula is located). If you have other words scattered about
the sheet then you would need a similar formula in another cell, but
you would need to change the two references to A3 to suit your other
cells. If you copy the formula, then you would need to paste it into a
cell which has the same positional relationship as you have at the
moment (i.e. if this formula is in A5 and you had a word in B6, you
would need to copy the formula into B8). If you want to copy into
different columns, however, you will need to change the formula to:

=IF(A3="","",VLOOKUP(A3,$M$1:$N$5,2,0))
or
=IF(A3="","",VLOOKUP(A3,$M$1:$N$35,2,0))

so that you are always referencing the same table.

Hope this helps.

Pete

Hope this helps.

Pete

On Jul 6, 3:18 pm, Tim wrote:
Thankyou, Once I have built the table how do I make it go through the whole
work sheet. Would I have to copy the formula in all the cells?
--
Tim



"Pete_UK" wrote:
You could build up a table, eg M1:N5 as follows:


Apple 2
Banana 4
Grape 7
Orange 5
Pear 3


Then in A5 enter:


=IF(A3="","",VLOOKUP(A3,M1:N5,2,0))


Hope this helps.


Pete


On Jul 6, 2:22 pm, Tim wrote:
I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.


Orange=3


Is this possible
--
Tim- Hide quoted text -


- Show quoted text -





  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Asigning a value to words

Glad we got there in the end - thanks for feeding back.

Pete

On Jul 6, 5:16 pm, Tim wrote:
Cheers worked a treat,
--
Tim



"Pete_UK" wrote:
I didn't realise you would be copying it down as you said the word was
in A3 and you wanted the return value to be in A5 (only room for one
more word). Normally you would arrange the words in one column (A) and
put the formula in another column (B), so that you could then copy
down as many as you wish. Change the formula to this:


=IF(A3="","",VLOOKUP(A3,M$1:N$5,2,0))


so now when you copy it down you will always be looking at the same
table (rather than M2:N6, M3:N7 etc as it was before. If you have more
than 5 reference words, so that the table occupies say M1:N35, then
change the formula to:


=IF(A3="","",VLOOKUP(A3,M$1:N$35,2,0))


then copy down.


Hope this helps.


Pete


On Jul 6, 4:28 pm, Tim wrote:
Pete, When I place the formula and try to copy into the cell belowA4 the
values of M1:N5 change within the formula so the more I put in the table more
gets missed out as I copy the formula into the sheet, any ideas.
--
Tim


"Pete_UK" wrote:
You could build up a table, eg M1:N5 as follows:


Apple 2
Banana 4
Grape 7
Orange 5
Pear 3


Then in A5 enter:


=IF(A3="","",VLOOKUP(A3,M1:N5,2,0))


Hope this helps.


Pete


On Jul 6, 2:22 pm, Tim wrote:
I have a cell ie. A3 which is a word and I want to tell cell A5 that whenever
it sees this word to asign it a value of 5 foe example.


Orange=3


Is this possible
--
Tim- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -



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
Combining Words Lanza52 Excel Worksheet Functions 1 August 20th 06 02:36 AM
Troubles with asigning x values and values to a chart [email protected] Excel Discussion (Misc queries) 0 July 31st 06 04:15 PM
words Debbie Excel Discussion (Misc queries) 2 August 5th 05 06:25 PM
how do i insert words into a column without erasing the words soccer5585 Excel Discussion (Misc queries) 0 June 8th 05 11:06 PM
more words ladeh57 New Users to Excel 1 February 21st 05 05:38 AM


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

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

About Us

"It's about Microsoft Excel"