MS Excel IF or VLookup

Not certain if this falls within an IF, VLookup or other function...
I have a column that will contain one of four different values: EE, ES, FA, WA

When one of the four codes is present I need to display an associated number in an adjacent cell/column (on that row).
EE=82.15
ES=180.75
FA=225.93
WA=0.00

Looking for the best way to accomplish this.
LVL 9
Lee IngallsDirector of IT/TS, Quality and FinanceAsked:
Who is Participating?
 
Saqib Husain, SyedConnect With a Mentor EngineerCommented:
=VLOOKUP(A1,{"EE",82.15;"ES",180.75;"FA",225.93;"WA",0},2,0)
0
 
byundtCommented:
I would put your values in a lookup table and use a VLOOKUP like:
=VLOOKUP(A2,LookupTable,2,FALSE)
0
 
byundtConnect With a Mentor Commented:
If you might have a different value in cell A2 than one of the four choices, I suggest using IFERROR around the VLOOKUP as shown in the attached file:
=IFERROR(VLOOKUP(A2,LookupTable,2,FALSE),"")
LookupTableQ28329283.xlsx
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Lee IngallsDirector of IT/TS, Quality and FinanceAuthor Commented:
Thank you. Both byundt's and your solutions looked similar in that they suggested VLookup; however Syed's more straight forward to implement. Thank you both for your suggestions.
0
 
Lee IngallsDirector of IT/TS, Quality and FinanceAuthor Commented:
I just requested an update to "accept multiple answers" since I also incorporated byundt's IFERROR suggestion into my final solution.
0
 
Lee IngallsDirector of IT/TS, Quality and FinanceAuthor Commented:
Thank you both for your knowledge and assistance.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.