Formatting Number Values from Mail Merge

J

jdawgnat

I am mailmerging from a .txt data source and I want to format the
following number: 00677400

I want it to display 67.74 and that's it.

I can't figure out a way to tailor my field to meet my criteria.
Any ideas?
 
G

Graham Mayor

Use a calculation field eg

{=({Mergefield fieldname} / 10000)}


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

jdawgnat

When using {=({Mergefield fieldname} / 10000)}

I get a syntax error. Do I have to covert it to a numerical value in
some way before trying to divide it by 100000? It is pulling it from a
..txt file.

- Thanks,

Jonathan
 
G

Graham Mayor

Did you insert the fields using CTRL+F9 for the field boundaries? You cannot
simply type curly brackets.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

You have to substitute 'fieldname' for the name of your field.
It works fine here.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

jdawgnat

It's an odd situation. It works on the initial letter in the mail merge
and calculates fine. As I go through to the rest of the letters in the
merge, it tells me

!Syntax Error, {

I am not sure why it would work on the first one and not the next
letters.
 
G

Graham Mayor

The error implies that you have an erroneous leading bracket (that's the
first error it finds). This suggests that there is a problem with the way
you have inserted the fields.

All the field combination does is to divide the content of the field by
10,000. In order for this to work, the field must contain a numeric value. I
know that you have said that you you inserted the fields using CTRL+F9, but
let's try a different tack.

Press CTRL+F9 which will give you
{}
Between the brackets type =( /10000)
Immediately after the first round bracket, insert the mergefield from the
drop down on the merge toolbar
{=(<<fieldname>> / 10000)}
Does it work now?

If not, check your data file to see what the field actually contains - a
simple way to do this is to create a temporary catalog merge containing both
the uncalculated field and the calculation on the same line. Merge to a new
document.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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