Merge field percentage

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Merge field percentage

Post by agibsonsw »

Hello.

In Word 2007 we're linking to Excel data. An Excel item is a percentage but it displays as 0.07
in Word. How do I amend the merge field in Word to display as a percentage?

Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
HansV
Administrator
Posts: 78527
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Merge field percentage

Post by HansV »

Unfortunately, Word doesn't "know" about percentages since it's a word processing application, not a spreadsheet.
One workaround is to multiply the data by 100 in the Excel workbook, and simply type a % character after the merge field in Word.
If you want to take care of it in Word:
- Select the merge field in Word.
- Press Ctrl+F9 to insert field braces { } around it (do *not* type { and } yourself, that will not work).
- Within the field braces, type the following before the merge field:

=100*

- Within the field braces, type a space immediately after the merge field, then type

\# "0%"

- Or if you want a decimal (e.g. 7.0%), change it to

\# "0.0%"

- You should now see something like

{ =100*«fieldname» \# "0%" }

- Press F9 to hide the field code and to update the result.
Best wishes,
Hans

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: Merge field percentage

Post by agibsonsw »

Hi, and thank you.

Shame we can't copy it having completed it once, and just amend the mergefield name - my colleague has quite a few fields to amend this way.

Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Merge field percentage

Post by macropod »

Hi Andy,

If you're using the same field in various places, a simple copy/paste of the modified field will do. If the fields differ you can still copy/paste of the modified field, then press Shift-F9 and change the mergefield's name.
Paul Edstein
[Fmr MS MVP - Word]