ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Change conditional formatting if the number is odd or even? (https://www.excelbanter.com/excel-worksheet-functions/453951-change-conditional-formatting-if-number-odd-even.html)

[email protected]

Change conditional formatting if the number is odd or even?
 
How do I do a conditional formatting option based on if the number in the referenced cell is odd or even? For example, if the cell is 16, text color it black, if the cell is 15, text color it red.

GS[_6_]

Change conditional formatting if the number is odd or even?
 
How do I do a conditional formatting option based on if the number in the
referenced cell is odd or even? For example, if the cell is 16, text color
it black, if the cell is 15, text color it red.


Select the cells to be ConditionalFormatted, then use the following
'formula'...

=ISODD()

...then set the Font color as desired.

The even values will be the default color unless you set another rule otherwise
using =ISEVEN().

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

Jianguo Li

Change conditional formatting if the number is odd or even?
 
Information Adding:
Some version Excel can't use "ISODD" worksheet function directly, such as
2003.
It needs to click menu "Tool"-"Add-in"-"Analysis tool", then you can use
it.
(Since I haven't English version, I don't what's exact name is.)

If this operation still doesn't work, you can use mod instead of "ISODD"
function.
=MOD(A1,2)


"GS" ???? ...
How do I do a conditional formatting option based on if the number in the
referenced cell is odd or even? For example, if the cell is 16, text
color it black, if the cell is 15, text color it red.


Select the cells to be ConditionalFormatted, then use the following
'formula'...

=ISODD()

..then set the Font color as desired.

The even values will be the default color unless you set another rule
otherwise using =ISEVEN().

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




GS[_6_]

Change conditional formatting if the number is odd or even?
 
Information Adding:
Some version Excel can't use "ISODD" worksheet function directly, such as
2003.
It needs to click menu "Tool"-"Add-in"-"Analysis tool", then you can use
it.
(Since I haven't English version, I don't what's exact name is.)

If this operation still doesn't work, you can use mod instead of "ISODD"
function.
=MOD(A1,2)


Yes, this is a better way! Thanks...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com