Custom format for decimal places

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,368
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Is there a custom format that can be applied to the following? Results like in column B, but I'm needing to apply the custom format on column A. Column A is the result of a formula.

[Table="class: grid"][tr][td] [/td][td]
A​
[/td][td]
B​
[/td][/tr]
[tr][td]
1​
[/td][td]
15.28​
[/td][td]
15.28​
[/td][/tr]

[tr][td]
2​
[/td][td]
15.00​
[/td][td]
15​
[/td][/tr]

[tr][td]
3​
[/td][td]
12.23​
[/td][td]
12.23​
[/td][/tr]

[tr][td]
4​
[/td][td]
0.02​
[/td][td]
0.02​
[/td][/tr]

[tr][td]
5​
[/td][td]
14.00​
[/td][td]
14​
[/td][/tr]

[tr][td]
6​
[/td][td]
0.11​
[/td][td]
0.11​
[/td][/tr]
[/table]
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If you choose the General Format (in which you do NOT denote the number or decimal places), it should do what you want, as long as your calculations in column A do not really have more than 2 decimal places. If they do, just use the ROUND function on your formula in column A, i.e.
=ROUND(your formula, 2)
 
Upvote 0
Hi Joe,

What if some of those numbers are percent's?
 
Upvote 0
What if some of those numbers are percent's?
You didn't mention that possibility.
In those cases, what do those values look like, and what do you want them to look like?

Note that percents are really just numbers (unless they are entered as text). It is formatting that shows them as percents.
So, the question is, how do you differentiate between them and other numbers?

I think it would be helpful to see exactly what the formulas in column A look like.
 
Last edited:
Upvote 0
Sorry about that

Data Range
[Table="class: grid"][tr][td] [/td][td]
A​
[/td][td]
B​
[/td][/tr]
[tr][td]
1​
[/td][td]
15.28​
[/td][td]
15.28​
[/td][/tr]

[tr][td]
2​
[/td][td]
15.00​
[/td][td]
15​
[/td][/tr]

[tr][td]
3​
[/td][td]
12.23​
[/td][td]
12.23​
[/td][/tr]

[tr][td]
4​
[/td][td]
0.02​
[/td][td]
0.02​
[/td][/tr]

[tr][td]
5​
[/td][td]
14.00​
[/td][td]
14​
[/td][/tr]

[tr][td]
6​
[/td][td]
0.11​
[/td][td]
0.11​
[/td][/tr]

[tr][td]
7​
[/td][td]
15.00%​
[/td][td]
15%​
[/td][/tr]

[tr][td]
8​
[/td][td]
3.45%​
[/td][td]
3.45%​
[/td][/tr]

[tr][td]
9​
[/td][td]
0.02%​
[/td][td]
0.02%​
[/td][/tr]

[tr][td]
10​
[/td][td]
23.00%​
[/td][td]
23%​
[/td][/tr]
[/table]
 
Upvote 0
What exactly do your formulas in column A show for the percent calculations and non-percent calculations?
 
Upvote 0
Hi Joe and thanks for your time.

I seperated the two columns and will just use a custom format like [>=1]0;[>0.001]0.00

That's seems to do the job.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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