Microsoft Office Forums Merging one of two fields, but they could be blank

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-30-2019, 02:46 PM
Ronstr Ronstr is offline Merging one of two fields, but they could be blank Windows 7 64bit Merging one of two fields, but they could be blank Office 2016
Novice
Merging one of two fields, but they could be blank
 
Join Date: Oct 2019
Posts: 1
Ronstr is on a distinguished road
Default Merging one of two fields, but they could be blank

I'm trying to use mergefield to create a label for our boxes.


On the label we have a spot for our customer's PO number (Purchase Order). One issue is that we do work for brokers and they want their customer's PO on the label. The last thing is sometimes we don't get a PO number at all.
We want to show the SubCustomerPO, but if it's blank we would then show the CustomerPO. We would not show both SubcustomerPO and CustomerPO. If they are both blank, we don't want to show anything.
I can get either to show, but if they are both blank, I still get a blank line on the label.

Someone gave me this, but it shows "PO: " if both fields are blank:

{ if{ MERGEFIELD "SubCustomerJob"}="" "PO#:" "{ MERGEFIELD"SubCustomerJob" } "} { if{MERGEFIELD "SubCustomerPOJob" }="" "{MERGEFIELD CustomerPO }" "{MERGEFIELD "SubCustomerPOJob" }" }

I also tried this, but it shows a blank line if both fields are blank:

{ if { MERGEFIELD "SubCustomerPOJob" } = "" { SET LabelPO{ MERGEFIELD "CustomerPO" }}{ SET LabelPO {MERGEFIELD "SubCustomerPOJob" }}}{ if { REF LabelPO } = "" "" "PO: " }{ REF LabelPO }

I'm sure I've overlooked what I'm supposed to do in everything I've read, but I haven't been able to find it.
Any help is appreciated.
Thanks
Ron
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging one of two fields, but they could be blank MailMerge Displaying Blank Fields in Emails constructionjasont Mail Merge 5 06-10-2019 06:13 AM
Merging one of two fields, but they could be blank Exlude Blank Fields using MIN in an ARRAY TomSv Excel 6 04-12-2016 04:47 PM
Merging one of two fields, but they could be blank Merging multiple fields within a Word letter from Excel LindsayV Mail Merge 2 04-08-2016 07:17 AM
Word does not put the files in the outbox of Outlook (merging with excel fields) Pannemanski Mail Merge 1 04-08-2016 03:58 AM
merging text into blank rolodex document Saloei Word 0 01-31-2009 05:23 AM


All times are GMT -7. The time now is 07:19 AM.


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