Link to home
Start Free TrialLog in
Avatar of al4629740
al4629740Flag for United States of America

asked on

using decimal points when necessary

I tried formatting my cell to datatype number and decimal of 1 space.  However, then when I do that it comes out like this:

4.0
5.0
.5
6.0

I want it the fields to show up like this

4
5
.5
6


How can I do this and use a decimal format only when necessary?
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Try custom format using 0.0
Avatar of al4629740

ASKER

same thing
ignore
You could format it as Text.
Try #.#
To get rid of the decimals from the whole numbers apply a conditional format IN ADDITION to the above. The formula should be

=A14=INT(A14)

Change A14 to whatever you have and use the "General" number format.
Using Text doesn't allow the SUM function to work for me.

#.# always leaves a decimal point on every field.   We are getting closer
Try adding the conditional format to this
Using Text doesn't allow the SUM function to work for me.

It works for me.
User generated image
Maybe it works for me because I also 'Justified Right'.
This is my sheet.  Notice the formulas dont work with Text property
GroupAttendance.xls
Did you try the formula auditing add on?
I just tried this using Custom format and it works.
[<1].0;[>=1]General
I can get it to work sometimes but not always. Frankly I think you should just accept and use your original formatting.
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial