Thread: Rounding
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Rounding


How are the three variable declared?
What is the value of TTax and SubTotal?
What is the number format of the cell that is receiving the data?
What is the code you use to add the value to the cell?
What version of Excel are you using?

Also, "Subtotal" is not a good name to use for a variable as it is already
used by Excel as a method of the Range object.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Jim at Eagle"
wrote in message
When, with this,
STaxRate = Application.Round(TTax / SubTotal, 7)
While in code the number is rounded to 7 digits but when posted to a cell in
worksheet it's stored at 16 digits.
How can I get my rounded number to a cell and still be rounded?
Thanks
--
Jim at Eagle