Round formula

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello Everyone, Wish you a very Happy and Colorful Diwali.
I have a data here where I have to enter the data in columns A:J and K:Q are auto calculated. I tried the round function to get the auto calculations to round to 2 decimal points but as you see some columns are displaying more than 2 digits. I need someone to help me correct my mistake.?
Book2
ABCDEFGHIJKLMNOPQR
1Gross2.52.566995A12A18A512185A12A18Around off
2939890204.29204.2973.7273.7234.2034.2040549.208085.17380.008171.601228.67380.00810984.0067376.422111.110000000000000-0.590000000
32640.0062.8662.862514.400.000.000.000.000.000000000000000-0.120000000
46885.00163.94163.946557.600.000.000.000.000.000000000000000-0.480000000
552080.001013.731013.73485.11485.1134.2034.2040549.208085.17380.000.000.000.000000000000000-0.450000000
69152.00435.820.000.000.008716.400.000.000000000000000-0.220000000
76290.00149.76149.765990.400.000.000.000.000.0000000000000000.080000000
84600.00219.050.000.000.004381.000.000.000000000000000-0.050000000
9
Sheet1
Cell Formulas
RangeFormula
K2:K8K2=ROUND(B2/2.5*100,2)
L2:L8L2=ROUND(D2/6*100,2)
M2:M8M2=ROUND(F2/9*100,2)
N2:N8N2=ROUND(H2/5*100,2)
O2:O8O2=ROUND(I2/12*100,2)
P2:P8P2=ROUND(J2/18*100,2)
Q2:Q8Q2=ROUND(A2-SUM(B2:P2),2)
 
Once you have formatted the column, then it should not change unless you already have something in your code that is changing the format.
 
Upvote 0
Solution

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I can add those to the VBA code, But I was hoping to find if there was any other way to round the amount to exactly decimal places without writing that in the code.
If you do nothing, by default it will not show all those zeroes after the number like you see in columns P and Q.
The only way it shows all those extra decimals is if someone already re-formatted the column to show all those decimal places (it would NEVER show anything like that by default, someone must have done that).

If you click on any of those cells, and go to the cell formatting, you will see that someone set those decimal places to 15, or whatever it is.
 
Upvote 0
Once you have formatted the column, then it should not change unless you already have something in your code that is changing the format.
Oh Yeah. I tried in a new sheet. Now it's working perfectly. Thanks Fluff.
 
Upvote 0
Oh Yeah. I tried in a new sheet. Now it's working perfectly. Thanks Fluff.
Like I said, that is not the default the behavior.
Somewhere along the way, someone told it to show that many decimal places.
 
Upvote 0
Like I said, that is not the default the behavior.
Somewhere along the way, someone told it to show that many decimal places.
Yes. I had overwritten the formula on the cell which I had written a different formula earlier and hence it was not showing the correct answer. I learnt something new. You have to clear all the cell first, to clear the old format then enter the formula.
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

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