Results 1 to 6 of 6
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Zero in <blank> field (XP/2K)

    I'm running a mail merge with an Excel spreadsheet as the data source. One of the fields in the spreadsheet is incomplete, i.e., not every record has this particular number yet (it's a student ID field). The merge field in the main document displays a zero for those records that do not have an ID number. How do I make it display a blank instead of the zero?

    Two more related questions:
    <UL><LI> An adjacent field displays nothing when the record has a null value

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Zero in <blank> field (XP/2K)

    I don't do mail-merge, but I would guess that you could format this field in Excel as text, assuming that it is currently formatted as Number or General.

    StuartR

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Zero in <blank> field (XP/2K)

    You could add a calculated field (column). Say that your ID's are in column A, starting with cell A2. Insert a blank column B, enter a column name in cell B1 and put the following formula in cell B2:

    =IF(ISBLANK(A1),"____",A1)

    Fill down as far as necessary. Use this field in the mail merge.

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Zero in <blank> field (XP/2K)

    For the thousandth time, Hans...thank you very much! <img src=/S/salute.gif border=0 alt=salute width=15 height=20>

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Zero in <blank> field (XP/2K)

    Hi Lucas:
    I'm a little late on this, but there might be an alternative. Instead of modifying the datasource, use the following field for the ID in Word:
    { IF <Mergefield ID> = "" "" "<Mergefield ID>"}

    This says to put in a blank if the mergefield for the ID is blank, else put in the mergefield. To put in a line, the field would be:

    { IF <Mergefield ID> = "" "_____" "<Mergefield ID>"}

    Finally, you could use a numeric picture switch in the Word field that would show blank or a line if the result is zero. e.g. for a blank line,

    { <mergefield ID> # #;-#;_____ }
    Cheers,

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Zero in <blank> field (XP/2K)

    Isn't it amazing how many different ways there are to do the same thing? Thanks, Phil!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •