?
Solved

MS Excel IF or VLookup

Posted on 2014-01-02
7
Medium Priority
?
524 Views
Last Modified: 2014-01-02
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.
0
Comment
Question by:Lee Ingalls
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 81

Expert Comment

by:byundt
ID: 39751917
I would put your values in a lookup table and use a VLOOKUP like:
=VLOOKUP(A2,LookupTable,2,FALSE)
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 1200 total points
ID: 39751924
=VLOOKUP(A1,{"EE",82.15;"ES",180.75;"FA",225.93;"WA",0},2,0)
0
 
LVL 81

Assisted Solution

by:byundt
byundt earned 800 total points
ID: 39751940
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 9

Author Comment

by:Lee Ingalls
ID: 39751966
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
 
LVL 9

Author Comment

by:Lee Ingalls
ID: 39751997
I just requested an update to "accept multiple answers" since I also incorporated byundt's IFERROR suggestion into my final solution.
0
 
LVL 9

Author Closing Comment

by:Lee Ingalls
ID: 39752026
Thank you both for your knowledge and assistance.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question