Oct 18 2019 01:50 AM
Let's say I have a table like this:
ID | Name |
1 | James |
2 | David |
3 | Jackie |
I want to have a cell (A4) show me the name of a person based on their ID number shown in another cell (A3).
In the A4 cell I write "IF(A3=1;"James";A3=2;"David";A3=3;"Jackie"). That works.
However, the list I am working with is way longer than 3 invidviduals. Is there a easier or quicker way to make such an IF-command without having to write the whole command with A3=1;"James";A3=2;"David".. and so on?
Thanks in advance,
Thor
Oct 18 2019 02:21 AM
In D2, you can enter a formula like:
=LOOKUP)C2,A$2:B$4)
Note that ID's are in A2:A4 and Names are in B2:B4.
Oct 18 2019 03:20 AM
Hi, I have attached an excel file and looks I do not resonate the result of IF function. Can help?
Rgds..Aziz
Oct 18 2019 05:46 AM
Oct 18 2019 05:52 AM
Hello@Thorkild1991
If you're using Office 365 or Microsoft Office 2019 version, you can easily deploy the IFS function which will handle multiple nested IF statement in older versions.
See an example of the IFS function in the attached caption
Oct 18 2019 06:03 AM