I kind of like odd things always have done, even this Function looks odd don’t you think?….it maybe odd but heck it works if you want to identify odd numbers in you data. (If the value you are testing is not a number then Excel will return the #value error).
If you want see see all of the blog posts in the #formulafriday series then you can click on this page right here.
number is the value to test and is a required argument.
Let’s work through two examples of using this function.
Example 1. Testing For An Odd Number.
This is really straightforward and simply tests if the value in a cell is odd or even.
The formula test the value in each cell, and correctly returns TRUE for an ODD number and FALSE for an EVEN number, and we have a sneaky value that is not a number which Excel rejects with an error!.
Example 2. Have You Entered An Odd Number?
This next example combines the power of ISODD with the powerful IF function to warn a user to restrict a user from entering anything else except an ODD number. Let’s set this up again using a slightly different data set.
This function nests ISODD within an IF statement and tests if the value in D2 is ODD, if the value is ODD, then the message will not be displayed, if the number is EVEN then the warning message is displayed until the user enters an ODD number.
Example 3. Is My Number ODD or EVEN?.
This last example again uses the IF statement with ISODD, but this time if the value is ODD then we display the text ODD, if the value is not ODD ie. EVEN then we get Excel to display the text “EVEN”.
Now It’s Your Turn!
Have you ever used ISODD in your Excel work?. If you have share with us how you did it!.
If you want MORE Excel and VBA tips then sign up to my monthly Newsletter where I share 3 Excel Tips on the first Wednesday of the month and receive my free Ebook, 30 Excel Tips. If you want to see all of the blog posts in the Macro Mondays Series you can do so by clicking on the link below.