Using Mergefield - Convert Negative Number into Positive Number

D

duttonkj

Currently bring data into word from a database to populate invoice reminder
letters, the problem is the 'Payment Outstanding' field in my database is a
Negative number. Displayed -10,000.00 for example.

Instead of spending time amending the fields and updating the database I was
hoping to use MergeField to do it for me....

I currently use { MERGEFIELD PaymentOutstanding\# #,##0.00} to merge the
data into word, which would display -10,000.00 in the word field

Any ideas how I can convert '-10,000.00' into '10,000.00'
 
M

macropod

Hi duttonkj,

There are various ways of doing this.

For example, you could embed the mergefield in a formula field and multiply the mergefield value by -1:
{=-{MERGEFIELD PaymentOutstanding) \# "$,0.00"}

Another way is to use a field switch:
{={MERGEFIELD PaymentOutstanding \# "'-'$,0.00;$,0.00"}

The first approach leaves a the formula field in the document, whilst the second leaves only the calculated result.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top