View Single Post
  #8   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

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 -