Hi, wonder if anyone can help.
I have a mail merge that is bringing in data from a csv. All the data imports perfectly. To line things up, I created it in a 2 column x 1 row table. This also has the advantage that the row auto resizes to the height required to display all the grades that aa customer has, and not leave a big blank space.Specifically, it has metal grade in one column and metal price in the other.
Now, to group certain things together, for example metal turnings (there may be copper, steel and brass turnings) I want a line space to appear between those and the other grades. To do this I have tried using some IF functions and another data point (called Metal#x) for the mail merge to determine if it is meant to be blank (and therefore add a space to the line to stop it being deleted) or if it is the last piece of data and can be deleted, along with anything below.
The code I came up with is thus;
Code:
{ IF { MERGEFIELD Metal3 }="" "{ IF { MERGEFIELD Metal3x }="x" " " "" }" "{ MERGEFIELD Metal3 }" }
My data has the form
Metal1 Metal1Price Metal1x Metal2 Metal2Price Metal2x etc
The x column was designed so that I could put an x in that column if it was left blank for a reason (because I wanted to space it out) but if it was left blank because there was no other data (they may only have 1 metal grade, for example) there would be no x (cell would be blank).
A picture might help demonstrate what I mean;
The numbers demonstrate which metal# it is. So in this case, Metal2x and Metal5x would have an x in and so a space should be inserted to stop the line being removed, but Metal7x through Metal15x would not and should therefore be removed.
But no matter what I try, I cant get it to remove anything below, in this example, metal6. If i look at the space formatting it has added a load of [ENTER]'s.
Anyone have any thoughts? I suspect its something obvious!