Adding two Merge Field gives Syntax Error in Formula (MS Word)

702 views Asked by At

I'm supposed to add two merge fields using formula and it's throwing syntax error enter image description here

This is what i am trying to add enter image description here

I've tried the bookmark thing I've tried using ctrl+f9 for brackets I've tried inserting merge fields using menu and manually using ctrl f9 I've tried integer merge fields and decimal merge fields In short, i have read so many blogs and tried all the possible solutions

1

There are 1 answers

10
macropod On

That is to be expected, because Word is trying the evaluate the mergefields, not their results. Previewing the merge or executing it should generate the correct result. If there is the possibility that either field will be empty, you can either:

  • Add numeric picture switches to the mergefield field codes; or
  • Prefix the mergefields with 0.

Hence, either:

  • {={MERGEFIELD SIF_Out \# 0.00}-{MERGEFIELD SIF_In \# 0.00}}; or
  • {=0«SIF_Out»-0«SIF_In»}

Note that the '\# 0.00' numeric switch allows for up to two decimals. For other numeric formatting options see: Mailmerge Number & Currency Formatting in Mailmerge Tips & Tricks page at: https://www.msofficeforums.com/mail-merge/21803-mailmerge-tips-tricks.html