How to write a formula to identify even and odd numbers from two cells (A1 & B1) into one cell (C1)?

arthurz11

Board Regular
Joined
Nov 9, 2007
Messages
80
Office Version
  1. 2021
Platform
  1. Windows
In Cell A1, can be any numbers from 0 to 3.
In Cell B1, can be any numbers from 0 to 3.
In Cell C1, the answer should be any four options. Depending on the numbers entered in A1 and B1:
EE, or OO, or EO, or OE.
E for Even and O for Odd number.
Example:
If A1 = 1 and B1 = 1. C1 the answer is "OO"
If A1 = 2 and B1 = 2. C1 the answer is "EE"
If A1 = 2 and B1 = 3. C1 the answer is "EO"
If A1 = 1 and B1 = 2. C1 the answer is "OE"
If A1 = 0 and B1 = 2. C1 the answer is "EE" (Note: zero is considered an even number)

In Cell C1, I have used =IF(AND(MOD(A1,2)=1,MOD(B1,2)=1),"OO","EE") but this "ONLY" works if both numbers or even or odd.
How do I combine the formula to include EO or OE? So if it's not EE or OO, it can be EO. or vice versa, OE?
 
Glad we could help & thanks for the feedback.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top