Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / September 2003

Tip: Looking for answers? Try searching our database.

IF THEN ... LESS THAN Negative number doesn't return true value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Crow - 26 Sep 2003 20:03 GMT
I am putting and IF ... THEN field into a merge document
where the code is

{IF {MERGEFIELD "MyMergeField" } <"-5" "I am true" "I am
false"}

If the MyMergeField = -30 I get the result I am true.
If the MyMergeField = 0 I get the result I am false.
If the MyMergeField = 5 I get the result I am false.
So far so good.

If the MyMergeField = -3 I get the result I am true.

Since I am testing to see whether the value is less than -
5 the result should be I am false.

Anyone have any ideas why this is happening and how I can
fix it?

Thanks,
Jonathan
Greg - 26 Sep 2003 20:54 GMT
Jonathan,

Try putting your Mergefield in a formula field:

{If { = { Mergefield "MyMergeField" } } < -5 "I am
true" "I am false"

>-----Original Message-----
>I am putting and IF ... THEN field into a merge document
[quoted text clipped - 20 lines]
>
>.
Cindy Meister  -WordMVP- - 28 Sep 2003 10:36 GMT
Hi Jonathan,

As Doug says, for Word, everything is text. It also doesn't
help with numeric comparisons if you put something ins
"quotes"! You'll generally have better luck leaving the
quotes away if you want to do "number stuff". In this case,
however, that doesn't help. BUT...

{ IF { Ref Test2 } < 0 "{ IF { = Abs({ Ref Test2 }) } > 5
"True" "False" }" "False" }

> I am putting and IF ... THEN field into a merge document
> where the code is
[quoted text clipped - 14 lines]
> Anyone have any ideas why this is happening and how I can
> fix it?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
Greg Maxey - 28 Sep 2003 13:26 GMT
Cindy,

Thank you, thank you, thank you.  I have been frustrated over this one.
Particularily the lack of documentation official or unofficial.

Signature

Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
Remove the obvious (wham...m)  to reply in e-mail

Cindy Meister -WordMVP- wrote:

> Hi Jonathan,
>
[quoted text clipped - 35 lines]
> follow question or reply in the newsgroup and not by e-mail
> :-)
Peter Jamieson - 28 Sep 2003 19:22 GMT
If you want to do

IF { a } < { b }

you can also consider

{ IF { ={ a }-{ b } } < 0 "True" False" }

(AFAIK it only works because all numbers less than 0 start with a "-", which
is lower in the collation sequence). Probably not much use if you also need
to detect small rounding errors.

--
Peter Jamieson
MS Word MVP

> Cindy,
>
[quoted text clipped - 47 lines]
> > follow question or reply in the newsgroup and not by e-mail
> > :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.