Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2014, 10:32 AM
dsummers dsummers is offline Mail merge how to link mail merge field value to a column heading Mac OS X Mail merge how to link mail merge field value to a column heading Office for Mac 2011
Novice
Mail merge how to link mail merge field value to a column heading
 
Join Date: May 2014
Posts: 1
dsummers is on a distinguished road
Default Mail merge how to link mail merge field value to a column heading

Hi, I'm creating some labels for delivery boxes and thought that mail merge would be the way forward. My labels contain i) the delivery details (name, address, postcode) and ii) the names of the items in the box and the volume.

I have managed to achieve this but, in the example attached, where I have '0' volume for a particular box item I don't want that item to be displayed at all, e.g. in the bread section if 'Fig & Red Wine' is '0' then I want to find a way of not returning the hardcoded text.

I've tried fiddling around with IF statements and switches but can't get anything to work. Is there a way of inserting the column headings as merge fields and then making their appearance contingent on the existence of values other than 0 in my data?

Your help would be greatly appreciated.

Kind regards
Dan
Attached Files
File Type: xlsx Mailmerge source data test 2.xlsx (47.9 KB, 17 views)
File Type: docx Mailmerge test doc 2.docx (93.6 KB, 12 views)
Reply With Quote
  #2  
Old 05-08-2014, 02:59 PM
macropod's Avatar
macropod macropod is offline Mail merge how to link mail merge field value to a column heading Windows 7 32bit Mail merge how to link mail merge field value to a column heading Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

To do this, you would have to redesign your document so that each row in the sub-tables is a separate table in its own right and embed that one-row table in a field coded along the lines of:
{IF{MERGEFIELD Fig__Red_Wine}> 0 "|Fig & Red Wine|{MERGEFIELD Fig__Red_Wine}|"}
where the '{}' represent the field brace pairs and the '|' represents the left/right cell borders.

Along the same lines, if you want to suppress the headings also when all rows for a sub-table are empty, you'd need to embed that in a field coded along the lines of:
{IF{={IF{MERGEFIELD Fig__Red_Wine}= 0 0 1}+{IF{MERGEFIELD Rustic_French}= 0 0 1}+{IF{MERGEFIELD MultiSeed}= 0 0 1}+{IF{MERGEFIELD Focaccia}= 0 0 1}}> 0 "|Bread|"}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge how to link mail merge field value to a column heading mail merge using data from column A as placeholder. keys Mail Merge 2 10-31-2013 01:55 AM
Mail merge how to link mail merge field value to a column heading How to ignore a mail merge field if the field is blank redzan Mail Merge 1 05-16-2013 08:34 AM
Mail merge how to link mail merge field value to a column heading How big can a mail merge field be? Engineer Mail Merge 2 12-11-2012 01:20 AM
Mail merge how to link mail merge field value to a column heading Mail Merge / DSN / Data Link / MySQL Bob Young Mail Merge 5 05-18-2012 03:44 PM
Mail Merge Anchoring column layouts HWSpencer Mail Merge 0 04-25-2008 06:08 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft