Solved

MS Excel - Multiple Criteria for If statement

Posted on 2016-08-17
2
33 Views
Last Modified: 2016-08-20
Hi,

Can you please help create an If statement that returns the following?  

Column A = Forms,  I need the value to return as a "A"
Column A = Pages, return the value "B"
Column A = Headers, return the value "C"
Column A = Footers, return the value "D"
Column A = Body, return the value "E"
0
Comment
Question by:Wonderwall99
2 Comments
 
LVL 2

Accepted Solution

by:
Martin Andrews earned 500 total points
ID: 41759813
=IF(A1="Forms","A", IF(A1="Pages","B", IF(A1="Headers","C", IF(A1="Footers","D", IF(A1="Body","E","")))))
0
 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41759818
One way is this....

In B2
=CHOOSE(MATCH(A2,{"Forms","Pages","Headers","Footers","Body"},0),"A","B","C","D","E")

Open in new window


The best way is to create a lookup table and use Vlookup formula to get the desired output if there are more criteria to be compared.
1

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

16 Experts available now in Live!

Get 1:1 Help Now