#1
|
|||
|
|||
Left Leading $ with decimal aligned numbers
I hope someone can help me with this mail merge problem! I'm loading from an excel spreadsheet into a word table. All the rows in the table come from the same row of data in the excel worksheet (it is not many to one).
The table is populating just fine but I can't get the cells formatted correctly for the numeric data. I'd like it to display as: $ 3,000.00 $ 400.00 $ 1,500.00 $ (20.00) I'm trying different permutations of \# \f \b with imbedded tabs but nothing I've tried will separate the $ while keeping the number formatting. (I've been ignoring the negative number until I get something working.) As just one example (Pls excuse my tab representation ->): {mergefield "cost_1" \# ->$ ->,0.00} Any advice is much appreciated! |
#2
|
||||
|
||||
The \b and \f switches don't work with other switches. Instead, you could code the mergefield as:
{ MERGEFIELD Cost \# "'$→'0.00' '; '$→'(0.00)"} or: { MERGEFIELD Cost \# "'$→'0.00; '$→'-0.00"} and use a right-aligned tab in the cell. To suppress 0 outputs, you could code the mergefield as: { MERGEFIELD Cost \# "'$→'0.00' '; '$→'(0.00);"} or: { MERGEFIELD Cost \# "'$→'0.00; '$→'-0.00;"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Wow. That's all I can say is just wow!
It was the single quotes I was missing. I tried it with and without double quotes but never even considered the need for single quotes. Thanks so much for your help! G'day |
Tags |
dollar format, tab alignment, table cell |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to format negative values in red, right aligned but have £ sign to the left? | Jules90 | Excel | 0 | 09-18-2020 03:13 AM |
Rtl text aligned right and ltr text aligned to left in one line - HOW? | wordnew | Word | 10 | 09-06-2020 08:23 AM |
Adding a decimal point in an already existing column of numbers | wheddingsjr | Excel | 3 | 07-26-2019 07:41 AM |
Table of Contents - page numbers not aligned to the right in longer headings | krneki | Word | 3 | 08-17-2015 08:34 AM |
Merge, Too many Numbers right of the Decimal Point | ohdearme | Mail Merge | 0 | 10-25-2009 05:10 PM |