Solved

MS Excel - Multiple Criteria for If statement

Posted on 2016-08-17
2
37 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
[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
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 30

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 Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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 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.

756 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