Forum Discussion
If Condition with text and multiple options
- Sep 30, 2020
Hi FreddyNoel ,
There are many ways to handle it, please find below you may construct your formula using VLOOKUP. your source data should be in ascending order to get the results.
=VLOOKUP(D4,$A$9:$B$13,2,TRUE)Attached is the sample file for your reference
Regards, Faraz Shaikh | MCT, MIE, MOS Master, Excel Expert
If you find the above solution resolved your query don't forget mark as Official/Best Answer to help the other members find it more
Nikolino
I know I don't know anything (Socrates)
Thank you, Nikolino, for your quick reply.
My apologies for inserting a picture instead of the file.
This was my first post and I am already learning.
Best regards
Freddy
- NikolinoDESep 30, 2020Platinum ContributorEverything is OK. You have received from Mr. Faraz Shaikh a proposed solution that suits you, as far as I have seen. I can't expect better than that.
Nevertheless, I would recommend adding a file (without sensitive data) the next time.
Thank you for your understanding
Nikolino
I know I don't know anything (Socrates)- FreddyNoelOct 01, 2020Copper Contributor
Thank you both for your input and if I may ask one more favour, it would make my spreadsheet amazing. As per Nikolino recommendation, I attach a file for easier editing.
Is there a possibility to add to the "=VLOOKUP(D9,$A$16:$B$20,2,1)" a complementary formula that would make my Gold rating cell coloured Yellow, Silver rating cell coloured Grey and Bronze rating cell coloured Brown? The colour could either be the text or the fill-in cell.
Thank you again for your amazing support.
Best regards
FreddyNoel
- NikolinoDEOct 01, 2020Platinum Contributor
In the inserted file you can see the formula in action.
in German:
=WENNFEHLER(SVERWEIS(D10;$A$16:$B$20;2);"")
in English:
=IFERROR(VLOOKUP(D10,$A$16:$B$20,2),"")
So you no longer have an error message ... if there is no value in D then E is also empty.
Hope I was able to help you and would be happy to know if I could help you.
Nikolino
I know I don't know anything (Socrates)