Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2012, 07:06 AM
venkys4u venkys4u is offline Custom formatting code - rounding problem Windows XP Custom formatting code - rounding problem Office 2007
Novice
Custom formatting code - rounding problem
 
Join Date: Aug 2012
Posts: 1
venkys4u is on a distinguished road
Question Custom formatting code - rounding problem

Here the problem raises with rounding the two decimal values. But i need like using trunc in custom formatting. I need the values not to get rounded with decimal but display as it was.



Problem 1

[>=1000000]$#0.00,, "M";[>=100000]$#0.00, "K";$#.00

this code converts millions and K with 2 decimals but it is rounding the first two digits

Values:106,008,784.41 69158976 36849808.41

Expected: 106.00 69.15 36.84
Actual: 106.01M 69.16M 36.85M


Problem 2

[>0] +##%;[<0]-##%;0

this code works as if it greater than 0 say 1, then display as +1% , lesser than 0 say -1 then -1% else 0

but when it goes without values when between (0.9 , -0.9) it result + % if the values between (+0.9,0) and -% if between (+0.9,0)

So i need it to round 0 if the values between (+0.9,-0) and (0,-.9)

Suggestions and codes are welcomes, thanked and highly appreciated.


Thanks in advance.
Reply With Quote
  #2  
Old 08-14-2012, 07:45 PM
macropod's Avatar
macropod macropod is offline Custom formatting code - rounding problem Windows 7 64bit Custom formatting code - rounding problem Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There is a limit to what you can achieve with formatting alone. AFAIK Numeric formatting always rounds to the nearest displayed precision level. If you're not satisfied with what you're seeing, you'll need to use a formula or edit the data.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
custom format, rounding



Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom formatting code - rounding problem Standard Dev. Rounding - Excel judicial85 Excel 1 08-28-2011 05:41 PM
Embedded Excel Graphs - Custom Formatting Cody Drawing and Graphics 0 07-02-2010 02:30 PM
Custom formatting code - rounding problem Federal financial rounding? markg2 Excel 6 05-26-2010 09:54 AM
Custom menu keeps reverting back to old code cookieboy66 Word 0 08-09-2009 03:44 AM
Opening messages/Code/custom archive jdd2 Outlook 0 12-20-2005 08:55 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft