# Combine IF, AND and CHOOSE to display month name : IF « Logical functions « Microsoft Office Excel 2007 Tutorial

Home
Microsoft Office Excel 2007 Tutorial
 1 Introduction 2 Editing 3 Format Style 4 Table 5 Chart 6 Formula 7 Workbook Worksheet 8 Wordart Clip Art Shape Picture 9 PivotTable PivotChart 10 Data Analysis 11 Macro ActiveX Add in 12 Security 13 Collaboration 14 Database functions 15 Date Time functions 16 Engineering functions 17 Information functions 18 Logical functions 19 Lookup Reference functions 20 Math Trigonometry functions 21 Statistical functions 22 Text functions
 Microsoft Office Excel 2007 Tutorial » Logical functions » IF
18.3.4.Combine IF, AND and CHOOSE to display month name
 `Input the formula: =IF(AND(A1>0,A1<13),CHOOSE(A1,"January", "February","March", "April", "May", "June", "July","August", "September", "October", "November", "December"),"That is not a month!")`
 18.3.IF 18.3.1. IF(logical_test,value_if_true,value_if_false) specifies a logical test 18.3.2. =IF(A2=100,SUM(B5:B15),"") 18.3.3. =IF(A2>89,"A",IF(A2>79,"B", IF(A2>69,"C",IF(A2>59,"D","F")))) 79,"B", IF(A2>69,"C",IF(A2>59,"D","F"))))" src="http://www.java2s.com/Tutorial/Microsoft-Office-Excel-2007Images/ifa2gt89aifa2gt79b_Ifa2gt69cifa2gt5___Input_Formula_ifa289aifa279b_Ifa269.PNG" width=200 height=40> 18.3.4. Combine IF, AND and CHOOSE to display month name 18.3.5. Combine IF, OR and CHOOSE to display month name 18.3.6. =IF(A1>A2, A1, A2): if the value in A1 is greater than the value in A2, then the value in A1 is returned. If not, then the value in A2 is returned. 18.3.7. =IF(A1>A2, "Good!", "Bad!"): if the value in A1 is greater than the value in A2, then the text "Good!" is returned. Otherwise "Bad!" is returned.