+ Reply to Thread
Results 1 to 6 of 6

Importing data, and removing blank cells

  1. #1
    Registered User
    Join Date
    03-04-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    3

    Importing data, and removing blank cells

    We are working on an address label sheet (i.e. sheet of 8 labels with multiple addresses to affix to customer orders).

    Data is imported into Excel and then printed.

    The label is in the following format,

    ---------------------------------------
    Return Address - 1A The Street, Someplace,
    Somewhere, AA1 1AA, United Kingdom.

    (CUSTOMER NAME)
    (ADDRESS 1)
    (ADDRESS 2)
    (ADDRESS 3)
    (POSTCODE)
    (COUNTRY)
    ----------------------------------------

    For the majority of orders this is fine, but some customers do not enter anything in the (ADDRESS 3) row or (POSTCODE) row, leaving these cells blank in Excel, and an address label printed as follows,

    ---------------------------------------
    Return Address - 1A The Street, Someplace,
    Somewhere, AA1 1AA, United Kingdom.

    MR A SMITH
    14 IRISH STREET

    DUBLIN

    IRELAND
    ----------------------------------------

    This looks rubbish! Is there a way to format the label properly, for example a formula to move cell text to the cell above or cell below if it is empty to give the desired format (below)?

    ---------------------------------------
    Return Address - 1A The Street, Someplace,
    Somewhere, AA1 1AA, United Kingdom.

    MR A SMITH
    14 IRISH STREET
    DUBLIN
    IRELAND
    ----------------------------------------

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Importing data, and removing blank cells

    have you tried filtering on non blanks?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    03-04-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Importing data, and removing blank cells

    Would that not need to be done manually?

    We are trying to find a solution that automates the process, so that when the data is imported it is in the correct format.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Importing data, and removing blank cells

    Hi,

    if you used Word mail merge, there's a biult-in functionality to skip blanks, so the problem won't come up.

  5. #5
    Registered User
    Join Date
    03-04-2009
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Importing data, and removing blank cells

    I have not got much experience with Word as I love all the features of Excel.

    Can data be imported into Word in the same way as Excel, with fixed widths?

    Thanks for the information. I will look into Mail Merge and see if I can knock something up.

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Importing data, and removing blank cells

    Hi,

    Word has ready made templates for address labels, based on different manufacturer's address label sheets.

    Just follow the mail merge wizard and go through it step by step. It's really hard to mess up.

    You can still have your raw data in Excel, with some lines having blanks in some columns, others may have all fields filled. Just your normal data records.

    Word will open Excel as the data source for the addresses. The labels are layed out on the Word document and the addresses are put on the labels. Blanks are skipped and Word will not print blank lines, so each address looks properly formatted.

    Check it out. It's a great tool.

    cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1