Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / January 2006

Tip: Looking for answers? Try searching our database.

Count the occurances of a data value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pschatz100 - 23 Jan 2006 03:55 GMT
I have a database that stores membership information for my club.  I ca
export member information as a .csv file, and would like to create
report that uses mailmerge to print selected member information
including a count of the member types (active, expired, etc.)  Fo
instance, using the .csv file as a data source I would print a list o
new members, plus a count of the total number of active members.

I can already read through the list of members, and using an I
conditional, just print the ones that are new members.  Pretty cool
Peter Jamieson - 23 Jan 2006 11:33 GMT
Counting them is relatively easy - something like

{ IF { MERGESEQ } = 1 "{ SET mycount 1 }" "{ SET mycount { ={ REF
mycount }+1 } }" }

should do it.

The real difficulty is that there is no easy way to tell that you are
merging the /last/ record so that you can then output the count.

In this case, one way to work around that would be to
a. output to a new document
b. output the count for every record in a format that is easily found using
Find/Replace. For example, you could output

##{ REF mycount }##

c. after the merge, delete the ## characters surrounding the final count,
then use  Edit Replace to replace "##(*)##" by "\1" (leave out the "
characters, click the "More" button in the dialog box, and check the Use
wildcards option.

Peter Jamieson

> I have a database that stores membership information for my club.  I can
> export member information as a .csv file, and would like to create a
[quoted text clipped - 5 lines]
> I can already read through the list of members, and using an IF
> conditional, just print the ones that are new members.  Pretty cool.
pschatz100 - 24 Jan 2006 05:06 GMT
Peter,

Thanks.  the counting works great.  People like you make this stuf
look easy!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.