Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2006

Tip: Looking for answers? Try searching our database.

How to Format Numbers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lee Harris - 18 Feb 2006 10:31 GMT
I'm trying to format some number fields so that positive numbers are
preceeded by a "+" and negative by the "-" and zero by space " " so they all
line up nicely

looking at a text file I have, it seems I want this:

+ (plus sign)
Adds a plus sign to a positive result, a minus sign to a negative result, or
a space if the result is 0 (zero). For example, { = 100 - 90 \# +## }
displays "+10", and { = 90 - 100 \# +## } displays "-10".
%, $, *, and so on

this is my mergefield (an example), but I can't get it to work with the
above format

{ MERGFIELD "INT" }

I tried

{ MERGFIELD \# +## "INT" } and
{ MERGFIELD "INT"  \# +##  }

but these didn't seem to work

can anyone help?

tx in advance
LeeH
Doug Robbins - Word MVP - 18 Feb 2006 13:00 GMT
Use the following formatting switch

{ MERGEFIELD INT \# "'+'#;'-'#;' 0'" }

A decimal tab might be another solution

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> I'm trying to format some number fields so that positive numbers are
> preceeded by a "+" and negative by the "-" and zero by space " " so they
[quoted text clipped - 24 lines]
> tx in advance
> LeeH
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.