if...then comparing field values?

R

R

I am trying to make a directory (member business "yellow pages", if you
will) by merging data in an Excel spreadsheet with a template I'm creating
in Word. I need to create a kind of grouping in my merge document to group
items by service type. I'll explain what I'm trying to do, and where I'm
stuck. If there is an easier way around this, I'm interested!

I'm planning the merge document (my directory) to have several listings per
page, and each will consist of an "if...then" statement that asks "If the
groupname is different than the previous groupname, write it, else write the
data for this business" but I'm not sure if I can compare the values of a
field like that. So it would turn up to look something like this:

GRAPHIC DESIGN

Graphic Design 1
GD1 phone
GD1 email

Graphic Design 2
GD2 phone
GD2 email

HAIR SALONS

Hair Salon 1
HS1 phone
HS1 email

Hair Salon 2
HS2 phone
HS2 email


And the spreadsheet looks like this ("|" represents field breaks or tabs)

businessname | businesstype | phonenumber | email
Graphic Design 1 | GRAPHIC DESIGN | GD1 phone | GD1 email
Graphic Design 2 | GRAPHIC DESIGN | GD2 phone | GD2 email
Hair Salon 1 | HAIR SALON | HS1 phone | HS1 email
Hair Salon 2 | HAIR SALON | HS2 phone | HS2 email

The group type is "businesstype".

Is this a good way to go? If yes, how to I compare field values in my
if...then in the merge document. If no, any other suggestions??

Thanks!
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

See the "Multiple items per condition" item under the "Special merges"
section of fellow MVP CIndy Meister's website at
http://homepage.swissonline.ch/cindymeister/MergFram.htm


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top