View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
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 -