View Single Post
  #2   Report Post  
Posted to microsoft.public.word.tables
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Format cell for currency

Hi dbalorenzini,

You can do this by adding a numeric picture switch to the SUM field. To do this:
.. select the field;
.. press Shift-F9 to reveal the field coding. It should look something like {=SUM(B1:B3)} (note that you don't need to specify each
cell in a spanned range);
.. edit the field so that you get {=SUM(B1:B3) \# $,0.00} (or whatever other numeric format you prefer - see below);
.. position the cursor anywhere in this field and press F9 to update it;
.. run your mailmerge.

Note: The '\# 0' in the field is referred to as a numeric picture switch. Other possibilities include:
.. \# 0 for rounded whole numbers
.. \# ,0 for rounded whole numbers with a thousands separator
.. \# ,0.00 for numbers accurate to two decimal places, with a thousands separator
.. \# $,0 for rounded whole dollars with a thousands separator
.. \# $,0.00;($,0.00);- for currency, with brackets around negative numbers and a hyphen for 0 values


The precision of the displayed value is controilled by the '0.00'. You can use anything from '0' to '0.000000000000000'.

If you use a final ';' in the formatting switch with nothing following, (eg \# $,0.00;($,0.00) zero values will be suppressed.
Note that this suppresses 0s resulting from empty fields and from fields containing 0s.

For more information on doing calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showto...#entry365 442
or
http://www.gmayor.com/downloads.htm#Third_party

--
Cheers
macropod
[MVP - Microsoft Word]


"dbalorenzini" wrote in message ...
I am working with a table in Microsoft Word 2007. I have figured out how to
add up a certain number of cells and do a sum and have that formatted for
currency. My question is that the cells that are in the formula (B1+B2+B3,
etc.) do not appear as currency. How can I format the entry cells for
currency?

Thank you for you advice in advance.