Conditional formatting of a row if cell value is even
Novice
-
jeff -
jeff -
Hello,
In a spreadsheet, my column A gives the record number. It starts at A7.
I would like each row to have a different color based on the number entered in A. If it is even, one color; if it is odd, another color.
Thank you for your help
Configuration: Windows / Chrome 59.0.3071.115
In a spreadsheet, my column A gives the record number. It starts at A7.
I would like each row to have a different color based on the number entered in A. If it is even, one color; if it is odd, another color.
Thank you for your help
Configuration: Windows / Chrome 59.0.3071.115
3 answers
-
Hello,
The MOD() function allows you to detect
an even number:
=MOD(A1, 2)=0
or an odd number
=MOD(A1, 2)=1
--
Best regards
Patrice -
Hello
1. Color the entire range in "odd color"
for example A2:A100
2. Then to get the "even colors" select the range
3. Ribbon/home tab/icon: conditional formatting
Choose: new rule
In the window: "use a formula to determine..."
=(MOD($A2,2)=0)
then fill pattern etc ...
Best regards -
Hello everyone,
If there are no values in column "A", then write this.=AND(MOD($A2,2)=0,$A2<>"")
=AND(MOD($A2,2)=1,$A2<>"")
Best regards.