View Single Post
  #4   Report Post  
Posted to microsoft.public.word.tables
Herb Tyson [MVP] Herb Tyson [MVP] is offline
external usenet poster
 
Posts: 2,936
Default parenthesis for negative numbers

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.

--

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


"Herb Tyson [MVP]" wrote in message
...
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.

--

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


"jr" wrote in message
...
how do I get the negative numbers to appear in parens instead of the
negative
sign in front of it?