Solved

MS Excel IF or VLookup

Posted on 2014-01-02
7
465 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
  • 3
  • 2
7 Comments
 
LVL 80

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 300 total points
ID: 39751924
=VLOOKUP(A1,{"EE",82.15;"ES",180.75;"FA",225.93;"WA",0},2,0)
0
 
LVL 80

Assisted Solution

by:byundt
byundt earned 200 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 7

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 7

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 7

Author Closing Comment

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

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now