View Single Post
 
Old 09-19-2018, 07:41 AM
Yarikh Yarikh is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2018
Posts: 6
Yarikh is on a distinguished road
Default Mail merge: remove empty rows when a field is not showed

Hello everybody.
I have a problem with the creation of a list with mail merge.

I have to translate an archival inventory from excel to word.
The colums of my table can be divided into two kinds: the ones that are always needed, and the optional ones. Also I need to put a label before certain fields.

For exemple:
ID, title, year, collocation are present in every record.
Content, notes are present only when needed.
_______
I created the template with mail merge using the IF function, so that when the optional fields are not empty it is showed "Label: blah blah blah", and when said fields are empty nothing is showed (not even the label).

My problem is that when a field is empty, it remains an empty row I would like to remove. Here an example:

ID: 1
Title: Human resources
Content: personal dossiers of the employees.
Note: Reserved informations.
Year: 2000

ID: 2
Title: Paid bills
[HERE I FIND AN EMPTY ROW]
[HERE I FIND AN EMPTY ROW]
Year: 2001


I would like my second record to appear:

ID: 2
Title: Paid bills
Year: 2001


_______
I attach some file so you can better understand the problem.

Thanks a lot!
Attached Files
File Type: xlsx DB.xlsx (11.3 KB, 36 views)
File Type: docx Merge template.docx (14.1 KB, 50 views)
File Type: docx Result.docx (29.0 KB, 34 views)
Reply With Quote