+ Reply to Thread
Results 1 to 5 of 5

Word calculation with mailmerging

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    87

    Word calculation with mailmerging

    I have a mail merge gap where it will bring in a figure from an external software (for this example we will call it "Balance") underneath we have another that will also be brought in (for this example we will call it "Payment 1"), which I need to have the sum of both dog and cat underneath.

    Balance >> 0.00 >> this figure, if 0 on the external software will come in as a blank figure, but other times it will be a balance on account. This is where I am no good, and need an IF formula that will say IF blank then show 0.00 if not then show the number

    Payment 1 >> 0.00 >> this figure will just be a number brought in

    Total >> 0.00 >> this needs to be "Balance" & "Payment 1" but obviously "Balance" is going to be complicated due to having to contain an IF.

    ______

    I currently have this;


    Balance { IF "{ MERGEFIELD Balance }" <> "" "{ MERGEFIELD Balance }" "0.00" }

    Payment 1 { MERGEFIELD Payment 1 }

    Total { = { IF "{ MERGEFIELD Balance }" <> "" "{ MERGEFIELD Balance }" "0.00" } + { MERGEFIELD Payment 1 }


    It works for when there is a number but has a syntax error when the figure is 0

  2. #2
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: Word calculation with mailmerging

    I think this is because The Merge field is looking for some form of data. The key with lists/info used in Mail Merge is that there can not be any gaps or missing information. I have seen people trying to use Mail Merge with an Excel spreadsheet that had lots of missing information - Mail Merge struggles with this particularly when doing envelopes!!!

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Word calculation with mailmerging

    You can handle the missing values with nothing more complicated than:
    {={ MERGEFIELD Balance } \# "0.00" }
    To add two such fields, you could use:
    {={={ MERGEFIELD Balance } \# "0.00" }+{={ MERGEFIELD Payment_1} \# "0.00" } \# "0.00" }

    Note: The field brace pairs (ie '{ }') for the above examples are created in the body of the document via Ctrl-F9 (Cmd-F9 on a Mac) - you can't simply type them or copy & paste them from this message.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Word calculation with mailmerging

    Cross-posted at: http://www.msofficeforums.com/mail-m...rd-2010-a.html
    For cross-posting etiquette, please read FORUM RULE 8: http://www.excelforum.com/forum-rule...rum-rules.html

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,905

    Re: Word calculation with mailmerging

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1