Conditional formatting if even value

Solved
fabnad Posted messages 29 Status Membre -  
 Gnagnagna -
Hello,

I am looking for a way to format the cells of a column.
If I enter an even number in one of the cells in the column, I want the cell to turn red (for example) and green if it is odd.

I suppose I need to set two conditions with formulas, but I am not sure which formula to use.

Thank you in advance.
Configuration: Windows Vista / Internet Explorer 7.0

3 réponses

gbinforme Posted messages 14930 Registration date   Status Contributeur Last intervention   4 742
 
Hello

Assuming column A is selected, the formula for even numbers is
=MOD(A1,2)=0

for odd numbers
=MOD(A1,2)<>0

--

Always zen
16
Gnagnagna
 

After several minutes of searching, I couldn't understand why it wasn't working for me. It's because you need to add a $

 =MOD($A1,2)=0

There you go. I don't have much of an explanation. I think it "blocks" the parity search on column "A".

In any case, I'm sharing the tip, and if it's not working for you either, give it a try; it might make the thing work.

0
gbinforme Posted messages 14930 Registration date   Status Contributeur Last intervention   4 742
 
Hello

Simply:
=A1="R"

or "the value of the cell is " then enter the value R
--

Always zen
2
fabnad Posted messages 29 Status Membre
 
Good evening

Thank you gbinforme.

Your solution is perfect

and how can I add a rule for the value R in one of the cells in column A?

Thank you
0