Forum Discussion

NConde's avatar
NConde
Copper Contributor
Oct 24, 2021
Solved

ODD, EVEN OR BLANK

I have a formula that is working great, but I want to add to the formula that if the cell its referencing is blank then it shows blank.

 

Here is the current formula.

=IF(ISEVEN($A6),"","N/A")

If the cell is even it will display N/A, if the cell is ODD it will display blank, and I want to add that if the cell is blank it stays blank.

 

  • NConde

    Your current formula will return N/A if the cell's value is odd, and a blank is the cell is empty or its value is even.

    If you want it to return N/A if the cell's value is even, use

     

    =IF(AND($A6<>"",ISEVEN($A6)),"N/A","")

     

    or

     

    =IF(OR($A6="",ISODD($A6)),"","N/A")

2 Replies

  • NConde

    Your current formula will return N/A if the cell's value is odd, and a blank is the cell is empty or its value is even.

    If you want it to return N/A if the cell's value is even, use

     

    =IF(AND($A6<>"",ISEVEN($A6)),"N/A","")

     

    or

     

    =IF(OR($A6="",ISODD($A6)),"","N/A")

    • NConde's avatar
      NConde
      Copper Contributor
      =IF(OR($A6="",ISODD($A6)),"","N/A")

      this one was perfect! Thank you!

Resources