Display a value based on text

Solved
ratafia12 -  
 ratafia12 -
Hello,

In Excel, I want a value (2;5;8 or others) to appear in a cell based on the text in another cell.

For example: if I write "amo" in B1, I want 3 to automatically appear in B5.
If I write "urée" in B1, I want 8 to automatically appear in B5.
If I write "entec" in B1, I want 26 to automatically appear in B5.
etc...

Thank you for your help.

Configuration: Windows XP / Firefox 10.0.2

2 answers

  1. Ricky38 Posted messages 5776 Registration date   Status Contributor Last intervention   1 463
     
    Hello,

    you will succeed with the IF function
    =IF(B1="urée",3,IF(B1="amo",8,IF(B1="entec",26,"")))
    to be placed in B5

    --
    Every problem has a solution...you just need to be persistent.
    1