Results 1 to 5 of 5
  1. #1
    mjwillyone is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    11

    Problem exporting multi-line addresses to Excel

    I exported a table from MS Access 2007 to Excel. In Excel, I would like a way to transpose all multi-line addresses in the address1 column into other columns. A 3-line address will take up 3 columns, a 4-line will take up 4. Is there a way to do this?

    I have attached a file that I think will help.

    Thank you,


    MikeAddresses from Access 2007.zip

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Is there a way to do this?
    What is the table structure? If the table has one field for the multi-line addresses, your table structure is not normalized.
    1) Use a query to get the multi-line addresses into the proper columns. Then export the query.

    2) Write code in Excel to parse the cell into 2 or 3 more cells.

  3. #3
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    it requires a certain symbol as a separator between lines or that each part have a fixed width.....

  4. #4
    mjwillyone is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    11
    Yes .. the symbol is what I cannot see to know how to remove it...

  5. #5
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    you will need to look up String manipulation functions/methods available in VBA; here is a list: InStr Left Right Mid and Len

    using a query; to begin you have a calculated field that identifies the character count to the first symbol and then displays just characters to the left; then you make a 2nd calculated field that begins to the right of the first symbol and finds the next symbol and displays the characters in between; so on and so forth - - you'll need at least 4 calculated fields if there are a max of 4 address lines - potentially more as you may need some interim fields to display to aid your view of the data.

    It is do-able. Takes a bit of time to get it right. But in the end you will end up with a query that has chopped the address into separate fields. Then this is what gets exported to excel.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-13-2014, 11:07 AM
  2. Exporting a Table to MS Excel problem
    By nosec in forum Import/Export Data
    Replies: 9
    Last Post: 11-05-2013, 11:28 AM
  3. Replies: 1
    Last Post: 10-19-2011, 07:51 PM
  4. Exporting to Excel Problem
    By octu in forum Import/Export Data
    Replies: 1
    Last Post: 04-14-2010, 11:28 PM
  5. Exporting Outlook email addresses
    By noidea in forum Import/Export Data
    Replies: 0
    Last Post: 08-01-2009, 01:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums