Reputation: 1177
I have an excel sheet that contains percentages. When doing the mail merge, it brings in the percentage as a decimal. I am sure this has been asked before which is why I have researched and tried multiple methods without success.
Currently, a field in excel that shows 60%, will display as 0.599999 in the word document:
When I use the following it rounds the field to 1%:
{MERGEFIELD Payout2 \# ##%}
When I follow the steps below:
{=«Percent»*100 \# 0.00%};
It actuallys changes the field to 60.00% in the word document, which is strange. It should just display the mergefield statement. It's almost like it already picks up the first field from the linked excel document even though I have not ran the merge. Also, when I do actually run the merge, on the last row I get a 5852 error and the field that showed 60.00% now shows !Syntax Error, *
I have a code that automatically creates the documents as the excel sheet has multiple rows. If I leave the payout field as is and not try to adjust it to fix the format, I get no errors (Just the decimal that I don't want).
If its not possible to convert this to a percentage that is fine, at least to a whole number. 60% to 60, so I can add the % symbol manually at the end.
Let me know what additional information is necessary.
Upvotes: 0
Views: 38387
Reputation: 60389
You're missing something in your method. Select the entire merge field before F9
to add another.
Your merge field should look like:
Note the braces around the original MERGEFIELD Payout
(and you don't type those in manually
If you've done that, in order to go back to see the original merge fields after you've done a preview, you need to select toggle field codes
twice. After the first, you'll see the result of the last import into the Payout field, and after the second toggle you'll see the original Payout field code.
Upvotes: 1