View Single Post
 
Old 04-07-2022, 12:16 PM
orhancelil orhancelil is offline Windows 10 Office 2016
Novice
 
Join Date: Apr 2022
Posts: 2
orhancelil is on a distinguished road
Default how to delete whole line if the merge field is empty

Hello,

Please see below. I have two lines with two merge fields in the middle which are linked on my excel to two column.
The goal is, if one of the columns are empty in excel, merge needs to delete that line completely with all sentence without a line break on the text.
I tried to use /b trick on the mergefield code but it didnt worked. Anyone with any idea how to do ? I attached my both excel and word files.

Heading
You are «Age1» years old.
You are «Age2»years old.
Text text text
Text text


Goal :

Heading
You are 12 years old.
Text text text
Text text



Thanks a lot
Attached Files
File Type: docx merge word.docx (14.1 KB, 7 views)
File Type: xlsx merge excel.xlsx (8.4 KB, 4 views)
Reply With Quote