Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2011, 09:19 AM
mike0919 mike0919 is offline using merge fields in "if then else" formula Windows 7 64bit using merge fields in "if then else" formula Office 2010 64bit
Novice
using merge fields in "if then else" formula
 
Join Date: Jul 2011
Posts: 2
mike0919 is on a distinguished road
Default using merge fields in "if then else" formula

I am trying to create an "if then else" formula in a mail merge but cannot find the correct syntax. I have tried:


{IF {MERGEFIELD LAST_CURRENT} = "" {MERGEFIELD LAST_HS} {MERGEFIELD LAST_CURRENT} }

Obviously, the above doesn't work. Any assistance would be greatly appreciated.

Last edited by mike0919; 07-29-2011 at 09:26 AM. Reason: Forgot one additional comment.
Reply With Quote
  #2  
Old 08-11-2011, 04:55 AM
macropod's Avatar
macropod macropod is offline using merge fields in "if then else" formula Windows 7 64bit using merge fields in "if then else" formula Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Mike,

There's nothing obviously wrong with the field syntax. Are you sure none of the field braces were typed? If created manually, they must be created in pairs via Ctrl-F9. Also, are you sure your 'LAST_CURRENT' field actually outputs nothing for missing data (eg not a 0 or a space)?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-11-2011, 08:40 AM
mike0919 mike0919 is offline using merge fields in "if then else" formula Windows 7 64bit using merge fields in "if then else" formula Office 2010 64bit
Novice
using merge fields in "if then else" formula
 
Join Date: Jul 2011
Posts: 2
mike0919 is on a distinguished road
Default If Then Else in Word

You're correct, I typed the field braces.
I created the field using "ctrl f9" for the braces and it worked...but you knew that!
Thank you.
Reply With Quote
  #4  
Old 03-27-2013, 11:07 AM
treeguy treeguy is offline using merge fields in "if then else" formula Windows XP using merge fields in "if then else" formula Office 2010 32bit
Novice
 
Join Date: Mar 2013
Posts: 1
treeguy is on a distinguished road
Default Performing Calculations using Mail Merge Fields

I'm running into a similar problem, and hopefully you can help. I get a syntax error and do not understand why.

Here is the simple calculation I am trying to do:

Cost / (90% * Rent), formatted with no decimals, where

Cost = $3,000.00
Rent = $247.00

which should yield 13.495276653171390013495276653171 but formatted and displayed as 13.

Here is the Word equation I entered:

{ =({MERGEFIELD Cost}/.9*{ MERGEFIELD Rent})) \# "0"}

Why do I get a syntax error?
Reply With Quote
  #5  
Old 03-27-2013, 02:50 PM
macropod's Avatar
macropod macropod is offline using merge fields in "if then else" formula Windows 7 64bit using merge fields in "if then else" formula Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You have too many ')'! Your field should be coded along the lines of:
{={MERGEFIELD Cost}*{MERGEFIELD Rent}/0.9 \# "0"}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing "Fill-In" merge fields vorm Mail Merge 0 07-27-2011 08:22 AM
using merge fields in "if then else" formula How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
using merge fields in "if then else" formula Excel 07 formating 17 cells "Need Formula" Raner Excel 2 05-30-2010 02:07 PM
"Microsoft Excel Application" missing in the "Component Services" on win08 sword.fish Excel 0 02-26-2010 02:09 PM
merge field formatting problem with "text to be inserted before" wissam Mail Merge 0 12-13-2009 12:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft