ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional formatting & decimal part of a number in cell (https://www.excelbanter.com/excel-worksheet-functions/199106-conditional-formatting-decimal-part-number-cell.html)

Mac

Conditional formatting & decimal part of a number in cell
 
Hello all,

in a conditional formatting scenario, which function do I use to decide if
the decimal part of the number in a cell is zero (i.e. x.0 and not x.1, x.2,
....)?

David Biddulph[_2_]

Conditional formatting & decimal part of a number in cell
 
=MOD(A1,1)=0

Or =MOD(ROUND(A1,1),1)=0 if you want to treat 4.02 as 4.0 in this respect.
--
David Biddulph

"Mac" wrote in message
...
Hello all,

in a conditional formatting scenario, which function do I use to decide if
the decimal part of the number in a cell is zero (i.e. x.0 and not x.1,
x.2,
...)?




Mac

Conditional formatting & decimal part of a number in cell
 
Uh oh, this does not seem to work; my numbers are either x.5 or x.0; I need
my x.0's get formatted and all x.5's left as they are. Might the decimal
format be the problem for MOD function?

"David Biddulph" wrote:

=MOD(A1,1)=0

Or =MOD(ROUND(A1,1),1)=0 if you want to treat 4.02 as 4.0 in this respect.
--
David Biddulph

"Mac" wrote in message
...
Hello all,

in a conditional formatting scenario, which function do I use to decide if
the decimal part of the number in a cell is zero (i.e. x.0 and not x.1,
x.2,
...)?





David Biddulph[_2_]

Conditional formatting & decimal part of a number in cell
 
Are you sure that what you think are numbers are actually numbers, and not
text? If the number is really a number, then a formula doesn't care what
format the number is *displayed* in, but looks at what the stored number is.
If the Conditional formatting hasn't worked, have you tried using the
formula in a helper column and checked the TRUE and FALSE results?
Are you sure that you have inserted the formula I suggested in the "Formula
Is" option under Conditional Formatting? Go back in to "Formula Is" and
check, as Excel will sometimes change what you think you entered.
--
David Biddulph

"Mac" wrote in message
...
Uh oh, this does not seem to work; my numbers are either x.5 or x.0; I
need
my x.0's get formatted and all x.5's left as they are. Might the decimal
format be the problem for MOD function?

"David Biddulph" wrote:

=MOD(A1,1)=0

Or =MOD(ROUND(A1,1),1)=0 if you want to treat 4.02 as 4.0 in this
respect.
--
David Biddulph

"Mac" wrote in message
...
Hello all,

in a conditional formatting scenario, which function do I use to decide
if
the decimal part of the number in a cell is zero (i.e. x.0 and not x.1,
x.2,
...)?







Mac

Conditional formatting & decimal part of a number in cell
 
David, the conditons you mentioned were all positive but th eproblem was -
for some reason, after having entered my condition formula and reopening the
Conditional Formatting dialog, the formula was surrounded by commas; deleted
those, saved, now it works great. Thanky you!!

"David Biddulph" wrote:

Are you sure that what you think are numbers are actually numbers, and not
text? If the number is really a number, then a formula doesn't care what
format the number is *displayed* in, but looks at what the stored number is.
If the Conditional formatting hasn't worked, have you tried using the
formula in a helper column and checked the TRUE and FALSE results?
Are you sure that you have inserted the formula I suggested in the "Formula
Is" option under Conditional Formatting? Go back in to "Formula Is" and
check, as Excel will sometimes change what you think you entered.
--
David Biddulph

"Mac" wrote in message
...
Uh oh, this does not seem to work; my numbers are either x.5 or x.0; I
need
my x.0's get formatted and all x.5's left as they are. Might the decimal
format be the problem for MOD function?

"David Biddulph" wrote:

=MOD(A1,1)=0

Or =MOD(ROUND(A1,1),1)=0 if you want to treat 4.02 as 4.0 in this
respect.
--
David Biddulph

"Mac" wrote in message
...
Hello all,

in a conditional formatting scenario, which function do I use to decide
if
the decimal part of the number in a cell is zero (i.e. x.0 and not x.1,
x.2,
...)?








All times are GMT +1. The time now is 08:13 PM.

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