How to do an if statement
Use
=M2&IF(N2"", ", "&N2,"")&IF(O2"",", "&O2,"")&IF(P2"",", "&P2,"")
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"Serendipity" wrote in message
...
Thought this worked and then I noticed that if a Child field is blank, I
get
commas. How can I separate the names with commas in my statement but not
get
them in the result if that field is blank. This is the statement I used.
=CONCATENATE(M2,", ",N2,", ",O2,", ",P2)
Thanks!
"Doug Robbins - Word MVP" wrote:
The easiest thing for you to do would be to add another column to your
Excel
spreadsheet in which you concatenate the contents of the Child_One,
Child_Two, Child_Three and Child_Four fields for each record and then
just
use that one field in your mailmerge.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"Serendipity" wrote in message
...
Using Word 2003. Data in Excel 2003 spreadsheet. Performing mailmerge
in
Word. How do I make an if statement that will get the value from any
one
of
the fields below regardless of whether the other ones are empty or not?
I
have a directory which includes who the children in the family are--all
listed on one line--separated by commas--below the name and address
information. I have looked at the KB articles but their examples have
only
two fields, and I am not experienced enough to apply their examples to
a
more
complex senario.
These are the fields in Excel.
«Child_One» «Child_Two_» «Child_Three» «Child_Four»
Thanks for your help.
|