Remove blank lines from merge form

D

Dvinechild

I'm creating a form from an Excel data source. A section under 'Motor
Condition' has 29 possible fields to populate. I'm trying to set these up as
header, then a 'Y' or blank as it applies per item. I got as far as an IF
function, but unlike regular merge fields with blank data reacting by
shrinking up a line if nothing is there, it keeps a hard enter or line. Due
to the nature of the form, I need the extra line gone (results in 29 blank
lines and boosting a longer form than necessary). The only reason I prefer
'Y' data is the hassel of typing in actual text and this needs to go faster
for data entry. This form gets cut/pasted into an eBay description area. Your
assistnace is appreciated.
 
P

Peter Jamieson

Can you give us an example of how your fields are currently set up?

Peter Jamieson
 
D

Dvinechild

Here's a sneak peek:
MOTOR SPECIFICATIONS
Year
HP
Cylinders
Compression (dry test)
Drive Make
Hours
Prop
Trolling Motor

MOTOR CONDITION

They are within a simple table b/c i need the structure and middle divider
to show as 2 columns when I cut/paste into eBay. Most fields will populate if
there is data in column in Excel. MergeFields with text before and other
simple formatting.
-------------------------------------------------------
 
P

Peter Jamieson

Sorry, I meant the MERGEFIELD fields you are using in Word, e.g.

{ IF { MERGEFIELD myfield } = "" "" "{ MERGEFIELD myfield }" }

or whatever.

Peter Jamieson
 
D

Dvinechild

Fields under Specification section are:
{MERGEFIELD Condition_Concerns\*Caps\b "Condition Concerns -"\*MERGEFORMAT

Under Motor Condition I'm using:
{IF {A=Y "Runs & Shifts" " "} }

The proper data appears, but I'm just having problems with the line
remaining if there is no data to pull from the data source field. Thanks for
your patience.
 
P

Peter Jamieson

This line should be removed if Condition_Concerns is blank

{MERGEFIELD Condition_Concerns\*Caps\b "Condition Concerns -"\*MERGEFORMAT

Is that what is actually happening?

For this one,
{IF {A=Y "Runs & Shifts" " "} }

I guess you must be using something like

{ IF "{ MERGEFIELD A }" = "Y" "Runs & Shifts" "" }

You either need

{ IF "{ MERGEFIELD A }" = "Y" "Runs & Shifts
" "" }{ IF "{ MERGEFIELD B }" = "Y" "The next thing
" "" }and so on

or if you include a blank column called "blank" in your Excel sheet, you can
probably use

{ IF "{ MERGEFIELD A }" = "Y" "Runs & Shifts" "" }{ MERGEFIELD blank }

(because it takes a blank field on a line to suppress the line, and blanks
generated by IF fields "don't count"

Peter Jamieson
 
D

Dvinechild

Peter, this is great information. We're getting warmer. I should have
clarified that there are 29 different columns of data that can feed into this
area, not just one out of 29. So, we could have a combination of usually up
to 5 different descriptions out of the possible 29. When setting up the form,
I'm trying to set each field and if there is data in any of the 29 data
fields that will populate. What it ends up looking like is something like
this:

Runs & Shift
Runs

Engine Seized
(notice the blank line where that data field did not have any data)
I'm looking to only have the data that applies appear and in consecutive
order with no blank lines.

(your previous formula is helpful though!)
If need be we can discuss offline and later post the answer.
 
G

Graham Mayor

If you put all the 29 conditional fields on the same line without a space
between them and use the format Peter suggested i.e.

{ IF "{ MERGEFIELD 1 }" = "Y" "Runs & Shifts
" "" }{ IF "{ MERGEFIELD 2 }" = "Y" "The next thing
" "" }and so on up to Mergefield 29!
then there should be no blank lines. The new line is only created when there
is a match.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

Dvinechild

Hi Again,
I seem to still be having some troubles with this. It's a bit more with
writing the correct formula and want to make sure that I need quotation marks
were stated below, and/or the term mergefield as shown. It hasn't quite
worked out correctly. If you know of online instructions as well, I'll be
more than happy to refer to those as well.
Justis
 
P

Peter Jamieson

Can you please show us what fields you have and what output you are hoping
to get?

Peter Jamieson
 
G

Graham Mayor

Yes you need the quotes where they are shown; and the new lines where they
are shown. Enter everything from the keyboard using CTRL+F9 for the field
delimiter brackets {}. Change the numbers 1 to 29 for the names of the
appropriate fields. http://www.gmayor.com/formatting_word_fields.htm may
help, but equally may confuse you more.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top