You are here:

Excel/Using Excel IF command for odd or even numbers

Advertisement


Question
Is it possible, using the IF command, to specify a certain outcome based on whether the number in a cell is odd or even.  I have tried various entries such as A1=ODD etc in the 'insert formula' field but always receive the 'invalid' error.

Thanks in advance for any help you can give me.

Answer
Justin:

You would want to use a formula similar to this:

=IF(ISODD(A1),"ODD","EVEN")

This formla will display the word ODD if the value in cell A1 is odd.  It will display EVEN if the value is even.

Please let me know if you have any additional questions!
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


Nathan Head

Expertise

Microsoft Excel questions related to advanced formulas, Pivot Tables, filters, forms, graphs, and just about anything else (EXCEPT Visual Basic Coding/Programming and Macros, I don't answer questions in those categories).


This expert requests a donation of $3 for questions answered to your satisfaction. Isn't $3 a value for this experts time?

Experience

I have been using spreadsheets since Lotus 1-2-3 was released. As a CPA, I use spreadsheets every day at work.

Education/Credentials
CPA, Texas

©2012 About.com, a part of The New York Times Company. All rights reserved.