Solved

MS Excel - Multiple Criteria for If statement

Posted on 2016-08-17
2
31 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

747 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

13 Experts available now in Live!

Get 1:1 Help Now