Stop rounding!

hallingh

Well-known Member
Joined
Sep 11, 2010
Messages
769
Excel is rounding dollar figures on my sheet to the nearest dollar, but I don't want it to do this. After looking at the formatting I don't really see why it is rounding, but I'm sure I'm missing something.

How do I get Excel to leave the cents in my cells and not round?

Thanks!

Hank
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
That's what I had it set to previously, which I thought would make it not round, but it is still rounding to the nearest dollar.
 
Upvote 0
O_o
Did you do any calculations before getting the output?
or did you type in the data yourself and it's displaying it as whole numbers?
 
Upvote 0
Ahhhh there's the problem. I'm adding two numbers together using vba to populate the cell. When I just type the number in it does not round it. How do I format the vba code to make it not round??? Thanks for the help.
 
Upvote 0
Well. When you're populating a cell with VBA
in order for it to be not integers, you need to make sure the variables you're adding up are not integers :)
So you could just set them as Double or Float (not too sure in VBA tho)

So let's say you want to add x and y
Code:
Dim x, y as Double
Sheet1.Range("A1").Value = x + y
should do the trick.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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