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 / Tables / August 2009

Tip: Looking for answers? Try searching our database.

parenthesis for negative numbers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jr - 31 Aug 2009 19:53 GMT
how do I get the negative numbers to appear in parens instead of the negative
sign in front of it?
Jay Freedman - 31 Aug 2009 21:04 GMT
> how do I get the negative numbers to appear in parens instead of the
> negative sign in front of it?

Use a numeric picture switch in the formula or sum field, as shown in
http://www.gmayor.com/formatting_word_fields.htm#basic_switch.

For example, if the numbers in the table column are decimals with two
digits, the field would look like

 { =SUM(ABOVE) \#"0.00; (0.00)" }

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Herb Tyson [MVP] - 31 Aug 2009 22:41 GMT
Delete the minus sign and press Shift+9 before the number and Shift+0 after
the number.

Or... did you mean automatically? If you mean automatically, Word does not
have the ability to format numbers in that way--for that, you could use
Excel. One way would be to embed an Excel worksheet inside Word to use as
the basis for your table. That way you would have all of Excel's
capabilities when editing and formatting the table.

Signature

Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com

> how do I get the negative numbers to appear in parens instead of the
> negative
> sign in front of it?
Herb Tyson [MVP] - 31 Aug 2009 23:40 GMT
I said:

> Or... did you mean automatically? If you mean automatically, Word does not
> have the ability to format numbers in that way...

Except using field codes, as Jay points out. However, unless you're already
using a field, enshrining your numbers in a { = } field seems like a lot
more work than just adding your own parentheses. It could also be done using
Find/Replace--with or without difficulty depending on whether the numbers
contains commas. Assuming they don't and numbers don't have more than 10
digits, select the table, row, or column of interest, and use:

Find what:-([0-9]{1,10})   (and enable Use wildcards)
Replace with:(\1)

Add the desired currency symbol as needed if you're dealing with money.

You could commit the Find/Replace to a macro and assign it to a
key/button/etc. so that you could simply apply it to a table that's
populated with numbers that need to be ()'ed.

If the numbers contain commas, a more complex specification might be able to
find them, but it's probably not worth the brain strain unless they do.

All in all... I'd use an Excel table if I needed (9) instead of -9 and had a
lot of instances.

Signature

Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com

> Delete the minus sign and press Shift+9 before the number and Shift+0
> after the number.
[quoted text clipped - 8 lines]
>> negative
>> sign in front of it?
 
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



©2010 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.