You would do best to pre-process you data, by adding extra columns for the names of people living at the same address, then consolidating them into a single record. During that process you could also clean up the formatting. This could probably be done via macro (getting rid of excess spaces, for example, it a trivial undertaking), but it's impossible to say for sure without seeing the data. You can then use the field coding logic in
in the Mailmerge Tips and Tricks threads at the top of this forum (https://www.msofficeforums.com/mail-...ps-tricks.html) to handle the addressing of households with the same or different surnames.
Alternatively, you
could use Word's Catalogue/Directory Mailmerge facility (the terminology depends on the Word version) to group the data by address, but the result probably wouldn't be ideal since each addressee's name would at least end up on a separate line. If that's OK, though, to see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
http://windowssecrets.com/forums/sho...merge-Tutorial
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.
The field coding for this is complex. However, since the tutorial document includes working field codes for all of its examples, most of the hard work has already been done for you - you should be able to do little more than copy/paste the relevant field codes into your own mailmerge main document, substitute/insert your own field names and adjust the formatting to get the results you desire. For some worked examples, see the attachments to the posts at:
https://www.msofficeforums.com/mail-...html#post23345
https://www.msofficeforums.com/mail-...html#post30327
http://windowssecrets.com/forums/sho...l=1#post928391
Alternatively, you may want to try one of the Many-to-One Mail Merge add-ins, from:
Graham Mayor at
http://www.gmayor.com/ManyToOne.htm; or
Doug Robbins at
http://bit.ly/1hduSCB
Similarly, field switches in Word can be used to reformat the data (e.g. changing upper-case blocks to Proper case, etc.) but you can only push this just so far - you can delete extraneous spaces, for example).