How do you merge a field as a percentage?

M

Merge Query

Help - I noticed there was information provided earlier, however I have found
this unhelpful.
When I merge a percentage it is coming across as a decimal, I have tried the
DDE option and this has not worked.

Look forward to your response
 
P

Peter Jamieson

For whole number percentages you should be able to use a nested field

{ ={ MERGEFIELD mypercentage } * 100 \#0% }

For fractional percentages such as 41.5% you can use, e.g.

{ ={ MERGEFIELD mypercentage } * 100 \#0.0% }

(add as many 0s at the end as you need) or

{ ={ MERGEFIELD mypercentage } * 100 \#0.#% }

(add as many #s at the end as you need)

In all cases, you need to substitute the correct field name instead of
"mypercentage", and the {} are all the special field code braces that you
can insert using ctrl-F9.

(What that won't do is display the perecentage in exactly the same format as
it appears in your data source. For example, if your data source may show
1.00% as 1%, 1.20% as 1.2%, 1.23% as 1.23% etc. whereas
a. the \#0.0% switch would result in 1.0%, 1.2% and 1.2% respectively
b. the \#0.#% switch would result in 1.<space>%, 1.2% and 1.2%
respectively
c. a \#0.00% switch would result in 1.00%, 1.20% and 1.23% respectively
....and so on. I don't have field code that does that and although it may be
fairly easy to do something useful it's probably best avoided unless you
really need it. Maybe macropod has tested code for that?)

Peter Jamieson
 
M

Merge Query

Peter

Thanks for the advice - I have done this and below is how the merge comes
out like:
{ = {0.00000000000000E-2 * 100\#0.00% }

Regards
 
P

Peter Jamieson

What result do you get when you use { MERGEFIELD mypercentage } on its own?

Peter Jamieson
 
D

Doug Robbins - Word MVP

Did you use Ctrl+F9 for each pair of field delimiters?

You need { = { MERGEFIELD mypercentage } * 100 \# "0.00%" }

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

Merge Query

Yes I did

Doug Robbins - Word MVP said:
Did you use Ctrl+F9 for each pair of field delimiters?

You need { = { MERGEFIELD mypercentage } * 100 \# "0.00%" }

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

Doug Robbins - Word MVP

There is something that you are not doing right. Send me the mail merge
main document if you wish and I will take a look at it.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - 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