Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
SJS SJS is offline
external usenet poster
 
Posts: 2
Default If... Then... Else... Formula Needed

I'm trying to create an If... Then... Else Statement which should go
something like this:

IF RecognizedAs is not blank then insert RecognizedAs, otherwise
insert ToWhom. This seems pretty basic to me, but it's not working.
What am I doing wrong? I'm assuming that I can insert field codes into If...
Then... Else... statement. Am I correct in that assumption? If so, what
else might I be doing wrong?

Thanks!
SJS
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default If... Then... Else... Formula Needed

Your fields should look approximately like this:

{ IF "{ MERGEFIELD RecognizedAs }" ""
"{ MERGEFIELD RecognizedAs }"
"{ MERGEFIELD ToWhom }" }

It's generally easier to insert these things by hand - use ctrl-F9 to insert
each pair of the special field braces {}, and type everything else in the
usual way. You can use Alt-F9 to toggle between "field code view" and "field
preview/results view"

Peter Jamieson
"SJS" wrote in message
...
I'm trying to create an If... Then... Else Statement which should go
something like this:

IF RecognizedAs is not blank then insert RecognizedAs, otherwise
insert ToWhom. This seems pretty basic to me, but it's not working.
What am I doing wrong? I'm assuming that I can insert field codes into
If...
Then... Else... statement. Am I correct in that assumption? If so, what
else might I be doing wrong?

Thanks!
SJS



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
SJS SJS is offline
external usenet poster
 
Posts: 2
Default If... Then... Else... Formula Needed

Thanks Peter, that helped a lot. However, I'm still running into some
problems. Here is an example of what I'm typing in, but I'm still not
getting the results I want.

{ IF "{ MERGEFIELD RecognizedAs}" "{MERGEFIELD ToWhom}" "{ MERGEFIELD
RecognizedAs}" "{ MERGEFIELD ToWhom} {MERGEFIELD Title}
{MERGEFIELD CompanyName} }

What I want to achieve is an inside address like this:

ToWhom Title
Company Name

However, I'm not achieving that. Instead, when the RecognizedAs field does
not equal the ToWhom field I get ONLY the ToWhom field and do not get the
Title and the CompanyName fields after it. I've tried many many other
combinations of brackets and quotation marks but I'm still doing something
wrong. I'd appreciate any suggestions you can offer.

Thanks Peter!
SJS


"Peter Jamieson" wrote:

Your fields should look approximately like this:

{ IF "{ MERGEFIELD RecognizedAs }" ""
"{ MERGEFIELD RecognizedAs }"
"{ MERGEFIELD ToWhom }" }

It's generally easier to insert these things by hand - use ctrl-F9 to insert
each pair of the special field braces {}, and type everything else in the
usual way. You can use Alt-F9 to toggle between "field code view" and "field
preview/results view"

Peter Jamieson
"SJS" wrote in message
...
I'm trying to create an If... Then... Else Statement which should go
something like this:

IF RecognizedAs is not blank then insert RecognizedAs, otherwise
insert ToWhom. This seems pretty basic to me, but it's not working.
What am I doing wrong? I'm assuming that I can insert field codes into
If...
Then... Else... statement. Am I correct in that assumption? If so, what
else might I be doing wrong?

Thanks!
SJS




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default If... Then... Else... Formula Needed

What if you try the following:
a. just

{ MERGEFIELD ToWhom } { MERGEFIELD Title }
{ MERGEFIELD CompanyName }

b. Select that lot, press ctrl-F9 to give you

{ { MERGEFIELD ToWhom } { MERGEFIELD Title }
{ MERGEFIELD CompanyName } }

then type IF 0 = 1 "" " ... " in such a way that you end up with

{ If 0 = 1 "" "{ MERGEFIELD ToWhom } { MERGEFIELD Title }
{ MERGEFIELD CompanyName }" }

Do you still get ToWhom, Title, and Companyname, or just ToWhom?

Peter Jamieson

"SJS" wrote in message
news
Thanks Peter, that helped a lot. However, I'm still running into some
problems. Here is an example of what I'm typing in, but I'm still not
getting the results I want.

{ IF "{ MERGEFIELD RecognizedAs}" "{MERGEFIELD ToWhom}" "{ MERGEFIELD
RecognizedAs}" "{ MERGEFIELD ToWhom} {MERGEFIELD Title}
{MERGEFIELD CompanyName}" }

What I want to achieve is an inside address like this:

ToWhom Title
Company Name

However, I'm not achieving that. Instead, when the RecognizedAs field
does
not equal the ToWhom field I get ONLY the ToWhom field and do not get the
Title and the CompanyName fields after it. I've tried many many other
combinations of brackets and quotation marks but I'm still doing something
wrong. I'd appreciate any suggestions you can offer.

Thanks Peter!
SJS


"Peter Jamieson" wrote:

Your fields should look approximately like this:

{ IF "{ MERGEFIELD RecognizedAs }" ""
"{ MERGEFIELD RecognizedAs }"
"{ MERGEFIELD ToWhom }" }

It's generally easier to insert these things by hand - use ctrl-F9 to
insert
each pair of the special field braces {}, and type everything else in the
usual way. You can use Alt-F9 to toggle between "field code view" and
"field
preview/results view"

Peter Jamieson
"SJS" wrote in message
...
I'm trying to create an If... Then... Else Statement which should go
something like this:

IF RecognizedAs is not blank then insert RecognizedAs,
otherwise
insert ToWhom. This seems pretty basic to me, but it's not
working.
What am I doing wrong? I'm assuming that I can insert field codes into
If...
Then... Else... statement. Am I correct in that assumption? If so,
what
else might I be doing wrong?

Thanks!
SJS






  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default If... Then... Else... Formula Needed

You have some brackets and quotes in the wrong places to achieve that.

{ IF { MERGEFIELD RecognizedAs} "{MERGEFIELD ToWhom}" "{ MERGEFIELD
RecognizedAs}""{MERGEFIELD ToWhom}" } {MERGEFIELD Title}
{MERGEFIELD CompanyName}

Should be nearer the mark. The title and company name fields are not part of
the conditional field. They are inserted normally.

--

Graham Mayor - Word MVP

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


SJS wrote:
Thanks Peter, that helped a lot. However, I'm still running into some
problems. Here is an example of what I'm typing in, but I'm still not
getting the results I want.

{ IF "{ MERGEFIELD RecognizedAs}" "{MERGEFIELD ToWhom}" "{
MERGEFIELD RecognizedAs}" "{ MERGEFIELD ToWhom} {MERGEFIELD Title}
{MERGEFIELD CompanyName}" }

What I want to achieve is an inside address like this:

ToWhom Title
Company Name

However, I'm not achieving that. Instead, when the RecognizedAs
field does not equal the ToWhom field I get ONLY the ToWhom field and
do not get the Title and the CompanyName fields after it. I've tried
many many other combinations of brackets and quotation marks but I'm
still doing something wrong. I'd appreciate any suggestions you can
offer.

Thanks Peter!
SJS


"Peter Jamieson" wrote:

Your fields should look approximately like this:

{ IF "{ MERGEFIELD RecognizedAs }" ""
"{ MERGEFIELD RecognizedAs }"
"{ MERGEFIELD ToWhom }" }

It's generally easier to insert these things by hand - use ctrl-F9
to insert each pair of the special field braces {}, and type
everything else in the usual way. You can use Alt-F9 to toggle
between "field code view" and "field preview/results view"

Peter Jamieson
"SJS" wrote in message
...
I'm trying to create an If... Then... Else Statement which should go
something like this:

IF RecognizedAs is not blank then insert RecognizedAs,
otherwise insert ToWhom. This seems pretty basic to me, but
it's not working. What am I doing wrong? I'm assuming that I can
insert field codes into If...
Then... Else... statement. Am I correct in that assumption? If
so, what else might I be doing wrong?

Thanks!
SJS



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
MS Word table - problem with conditional formula Peterkins Tables 20 April 18th 06 12:18 PM
Word 2003 Table Formula Number format displays errors. Mark Microsoft Word Help 2 April 6th 06 06:51 AM
CLOSEST TEMPLATE TO REQST MORE INFO NEEDED TO UPDT THE ACCT MSANTOINETTE55 Microsoft Word Help 0 November 8th 05 07:29 PM
Formula to Sum values in word table Craig Mailmerge 1 August 29th 05 06:19 PM
I need a formula of amount of hours from two times in two cell? dmvargas29 Tables 2 November 20th 04 02:48 AM


All times are GMT +1. The time now is 12:34 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"