Is there a way to suppress digits to the right of the decimal place and suppress the decimal place if none?

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,541
Office Version
  1. 365
Platform
  1. Windows
Is there a custom format that will display 1 or more significant digits to the right of the decimal place and will suppress the decimal point if there are none?

I want to be able to use a single custom format, like "0.###" to get this effect:

image.png


Is that possible? If so, how?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
No - you would need a conditional format for that.
 
Upvote 0
No - you would need a conditional format for that.
Could you provide an example?

I did find this solution:


It works, but it requires two columns.

image.png


I'd like a way to be able to enter the data and have it formatted and displayed in the same cell -- while retaining the original value.
 
Upvote 0
Actually, looking at your example, General format would do what's in your picture.
 
Upvote 0
Solution
Actually, looking at your example, General format would do what's in your picture.
I figured out what the problem is. After your comment, I tested it again. I first tried it in a new workbook. It worked. I then tried it in a new sheet in the workbook in question. It worked. I then tested it on a different cell in the same sheet. Some cells worked and some didn't. Then I realized that the problem was the column width. Excel was rounding to fit the cell.

Doh! :whistle:

Thanks
 
Upvote 0

Forum statistics

Threads
1,215,848
Messages
6,127,275
Members
449,372
Latest member
charlottedv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top