View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
RobWN RobWN is offline
external usenet poster
 
Posts: 2
Default Comparison problem w/SkipIf

Thanks Graham, you gave me the hint I needed (I was seeing the dash as a hyphen, Word thinks
it's a minus-even if xl doesn't.
FWIW they are Company-Division numbers.

I can't (don't want to) change the xl data for a variety of reasons-mainly because the file is
used by a number of apps..

However I found another field I could use-each record has an id field formatted as
####AAAAAA####.
the 1st four #'s are the same as the 1st four in my original e-mail, the alpha's are a portion
of last/first names and the trailing #'s are Year/Mo.

I simply had to change the instruction to SkipIf field = 1000ZZZZZZ9999 and presto!

Again, thanks for the wakeup call!
--
Regards
Rob
"Graham Mayor" wrote in message
...
You can't use a numeric operator with text field data.
How does the sequence run with respect to the two numbers separated by a hyphen?
As you have it the field is undoubtedly substracting 999 from 1000 so you are searching for
SKIPIF Field 1
There are two solutions that sprint to mind
1. Remove the hyphen from the Excel data source and format the number in Word with a switch -
\# "0000'-'000" where you require the number to be placed but you can then use your skipif
field "1000999"
2. Add two columns to the data source to contain the two parts of the number without the
hyphen.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




RobWN wrote:
Word/Xl '03
The merge data in xl is formatted as General and is in the form of
####-###. I want the record(s) to be skipped if the value is less than a
specific value, for ex Skipif field is "1000-999"
The merge doesn't seem to recognize or operators (only =).
I tried changing the format in xl to Text (and re-entered the value)
- no effect.
What am I missing?