ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   display/not display numbers to right of decimal (https://www.excelbanter.com/excel-discussion-misc-queries/50313-display-not-display-numbers-right-decimal.html)

James C

display/not display numbers to right of decimal
 

I have a formula in a cell producing results:
e.g. - 40.00
e.g. - 40.25

If the result is an integer, I want it displayed as "40", not "40.00".

Hence, I would like to display:
40
40.25

Is there an easy way to do this, either through formatting the cell, or
a formula tweak?

Thanks.

- jim


--
James C
------------------------------------------------------------------------
James C's Profile: http://www.excelforum.com/member.php...o&userid=12114
View this thread: http://www.excelforum.com/showthread...hreadid=475988


swatsp0p


Try formatting your cells as General. Does this help? You may have set
your format to Number, which, by default, places 2 decimals in <every
answer. You can alter the default 2 decimals anywhere from zero to 30,
but this well impact every entry whether it is an integer or not.


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=475988


James C


Swatsp0p,

that did it
thanx very much

Jim


--
James C
------------------------------------------------------------------------
James C's Profile: http://www.excelforum.com/member.php...o&userid=12114
View this thread: http://www.excelforum.com/showthread...hreadid=475988


swatsp0p


I'm glad it worked for you. Thanks for the feedback, it is always
appreciated.

Cheers!


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=475988



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

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