Solved

MS Excel - Multiple Criteria for If statement

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

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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Suggested Solutions

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…
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.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 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