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
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
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
All Courses

From novice to tech pro — start learning today.