Excel/Using IF statements
Expert: Aidan Heritage - 11/6/2009
QuestionQUESTION: I am trying to use an IF statement to automatically determine a value of a cell (A1) based on the value of another cell (B1). However, A1 has a static number based on a series of consecutive numbers, for example, if the value of A1 is 214-286 then B1=38. If the value of A1 is 287-300 then B1=40. I was trying to do it like this =IF(A1=214:286,38,IF(A1=287:300,40,"N/A")) However, it is not working. Your knowledge would be greatly appreciated. Thank you in advance.
ANSWER: Not clear from the question how many possible values you need to check, so you MAY run into a problem if it requires more than 7 nested bracket levels - at which point, I'd switch to using a lookup table. But to fix the formula as it stands
=IF(AND(A1>=214,A1<=286),38,IF(and(A1>=287,A1<=300),40,"N/A"))
---------- FOLLOW-UP ----------
QUESTION: It definitely requires more than 7 values. More like 50. I'm not familiar with a lookup table.
AnswerOK, well - there is a dictionary of excel terms I found some time back which you can get at
http://www.aidanheritage.byethost3.com/excel/xlfdic01.xls - this has worked examples- it's vlookup you will need - and if you would like to mail me a sample file I can work on that for you - my email is aidan.heritage@virgin.net
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