Excel/IF AND IF

Advertisement


Question
Hi Aidan,


Want formula in cell CF2 that does the following:
1.   If cell AM2 equals either 9th, 10th, 11th, or 12th, (options from a validation list of 1st -12th grades)
2.   And if cell AP = x
3.   Then place an x in cell CF

I tried some expanded/modified variations of "=IF(J14=0,0,J14/J17" and "=IF(OR(A1=B1;A1=B2;A1=B3;A1=B4;A1=B5);C1;C2)" which I use in another workbook, but I couldn't get them to work correctly in the new scenario.

Answer
It's a combination of AND and OR which would work something like this

=IF(AND(OR(AM2="9th",AM2="10th",AM2="11th",AM2="12th"),AP2="x"),"x","")

Your explanation of the question and the example formula didn't quite agree, hence my using "9th" "10th" etc - if these are actual cells then just replace my reference with the cell reference.  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Aidan Heritage

Expertise

I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!

Experience

My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

Education/Credentials
I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!

©2016 About.com. All rights reserved.