[mso] Re: Word Merge-Nested IF maybe

  • From: "Andrew" <ak_lists@xxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Wed, 3 May 2006 15:00:04 +0100

Glenda,

VLOOKUP (in Excel) is exactly what you need.  First set up a table elsewhere
(another sheet in the same file will do) with the first column as the State
abbreviation and the second column with the text specific to each state.
You can use headings to the columns but you shouldn't include them in the
range to use for VLOOKUP.  It's useful to name the range, so select both
columns (excluding the headings, if used) and name it State_lookup (or
whatever you choose).

Next to your STATE column in the Data table, create a new column headed
(say) STATETEXT which has =VLOOKUP(D2,State_lookup,0) and replicate down.
The text appropriate to each state will appear next to each entry and you
can use that column as a merge field.

Andrew

> -----Original Message-----
> From: mso-bounce@xxxxxxxxxxxxx 
> [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf Of GLENDA WELLS
> Sent: 03 May 2006 14:36
> To: mso@xxxxxxxxxxxxx
> Subject: [mso] Re: Word Merge-Nested IF maybe
> 
> Thanks David. I don't think VLOOKUP is the thing.  I want a 
> unique comment depending on the STATE in the row of data.
> 
> Here's a sample of what I'm talking about. The info in 
> brackets is the unique comment.
> 
> FILE
> FNAME, LNAME, ADDRESS, STATE
> David, Smart, 111 1st St, MS
> Tanya, Tucker, 222 2nd St, TN
> Ryan, Kettle, 333 4th St, CO
> 
> 
> LETTERS
> Dear David.
> 
> Mississippi [is the best state to live in].
> 
> Dear Tanya.
> Tennessee [is known as the home of Elvis Presley].
> 
> Dear Ryan.
> [Have you ever gone skiing in] Colorado?
> 
> 
> 
> 
> >From: "David Smart" <smartware@xxxxxxxxxxxxxxx>
> >Reply-To: mso@xxxxxxxxxxxxx
> >To: <mso@xxxxxxxxxxxxx>
> >Subject: [mso] Re: Word Merge-Nested IF maybe
> >Date: Wed, 3 May 2006 22:08:09 +1000
> >
> >You haven't explained it terribly well, but ... do you for instance 
> >want to look up one of 50 pieces of canned text (one for each state)?
> >
> >If so, it might be VLookup that you're after.  It can search down a 
> >column of state abbreviations and then return the information from 
> >another column on the same row.
> >
> >Regards, Dave S
> >----- Original Message -----
> >From: "GLENDA WELLS" <gwells58@xxxxxxx>
> >To: <mso@xxxxxxxxxxxxx>
> >Sent: Wednesday, May 03, 2006 8:32 PM
> >Subject: [mso] Word Merge-Nested IF maybe
> >

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts: