Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Dudely Dudely is offline
external usenet poster
 
Posts: 1
Default Solved: UNEXPECTED END OF FORMULA

I finally figured out what gives the dreaded "UNEXPECTED END OF
FORMULA" message and how to fix it.

Lets say you're trying to do a calculation such as Quantity1 +
Quantity2

Here's the right way to do it:

Hit CTRL-F9. That will place a pair of braces {} where your cursor
is, except it's not just a normal pair of braces, it comes "shaded".
I'll let someone else explain the details of that.

Next, move your cursor inside the braces. Hit CTRL-F9 again.

That will give you a second pair of braces. { {} } Move the cursor
again so it's next to that second set you just created and hit CTRL-F9
again. You should end up with { {} {} }. If you don't move your
cursor, you'll end up with { { { } }}, which isn't what you want.

Now, add in your mergefields - and here's the really important part.
Do NOT use the "insert mergefield" button - this is what causes the
error! Instead, HAND TYPE "MERGEFIELD Quantity1" w/out the quotes of
course, and where "Quantity1" is your specific mergefield. Do the
same for quantity2 and/or any other fields you're using. Simply
repeat the above braces inserts for each field. I find it easiest to
insert all of my braces first, and then fill them in with the proper
mergefields, otherwise I quickly get lost as to what goes where.

So, for the above example you'd end up with { { MERGEFIELD Quantity1}
+ {MERGEFIELD Quantity2} }

I'm not sure if spaces are important or not, if you have problems, try
adding extra spaces between the braces and the words.

Now, to make this work you need to add in an equal sign at the
beginning... like this:
{ = { MERGEFIELD Quantity1} + {MERGEFIELD Quantity2} }

Finally some notes. Operators (like plus, minus, multiply, divide,
etc.) and constants (like integers and things) go inbetween brace
fields. Note where the above plus sign is placed.

I hope that solves this problem once and for all. I haven't seen the
answer anywhere else on the Net.

- APB aka Dudely
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Solved: UNEXPECTED END OF FORMULA

You have described the use of fields, which is pretty generally known.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"Dudely" wrote in message
...
I finally figured out what gives the dreaded "UNEXPECTED END OF
FORMULA" message and how to fix it.

Lets say you're trying to do a calculation such as Quantity1 +
Quantity2

Here's the right way to do it:

Hit CTRL-F9. That will place a pair of braces {} where your cursor
is, except it's not just a normal pair of braces, it comes "shaded".
I'll let someone else explain the details of that.

Next, move your cursor inside the braces. Hit CTRL-F9 again.

That will give you a second pair of braces. { {} } Move the cursor
again so it's next to that second set you just created and hit CTRL-F9
again. You should end up with { {} {} }. If you don't move your
cursor, you'll end up with { { { } }}, which isn't what you want.

Now, add in your mergefields - and here's the really important part.
Do NOT use the "insert mergefield" button - this is what causes the
error! Instead, HAND TYPE "MERGEFIELD Quantity1" w/out the quotes of
course, and where "Quantity1" is your specific mergefield. Do the
same for quantity2 and/or any other fields you're using. Simply
repeat the above braces inserts for each field. I find it easiest to
insert all of my braces first, and then fill them in with the proper
mergefields, otherwise I quickly get lost as to what goes where.

So, for the above example you'd end up with { { MERGEFIELD Quantity1}
+ {MERGEFIELD Quantity2} }

I'm not sure if spaces are important or not, if you have problems, try
adding extra spaces between the braces and the words.

Now, to make this work you need to add in an equal sign at the
beginning... like this:
{ = { MERGEFIELD Quantity1} + {MERGEFIELD Quantity2} }

Finally some notes. Operators (like plus, minus, multiply, divide,
etc.) and constants (like integers and things) go inbetween brace
fields. Note where the above plus sign is placed.

I hope that solves this problem once and for all. I haven't seen the
answer anywhere else on the Net.

- APB aka Dudely



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoFormat/AutoCorrect - Problem Solved! K Microsoft Word Help 1 March 13th 08 10:42 PM
Unexpected Prompts for Password - SOLVED Scott Sornberger[_2_] Microsoft Word Help 1 March 7th 08 06:16 AM
Error - UNEXPECTED END OF FORMULA Dee Microsoft Word Help 5 December 3rd 07 09:25 PM
MS Word (Problem Solved!!!) GusGus Microsoft Word Help 0 August 18th 06 06:34 PM
Problem with bullets still not solved Gerry New Users 1 May 4th 06 11:11 AM


All times are GMT +1. The time now is 02:42 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"