+ Reply to Thread
Results 1 to 6 of 6

How to alter the format of a referenced cell: from multiple lines/cells to one line.

  1. #1
    Registered User
    Join Date
    05-30-2015
    Location
    Beijing, China
    MS-Off Ver
    2007
    Posts
    9

    How to alter the format of a referenced cell: from multiple lines/cells to one line.

    Hi

    I have searched for the answer but I must not be using the correct terminology because I cannot find an answer.

    A brief background: I am using Word for printing customs documents and address labels but I am trying to streamline my operations using excel.

    Currently I copy and paste an address into one word document for the address label and then print it. I then paste the address again into another document and run a simple macro that finds the paragraph marks and replaces them with a comma. This has the effect of changing an address from being written on separate lines to all being on one line which is what I need for the customs documents.

    The idea I had was to have a master sheet that I paste the address into only once and then the address would automatically be referenced in two other sheets, one for the address label and one for the customs document.

    I have no problem getting the address label set up because the address is already in the correct format. The problem I am having is finding a way to get the referenced address/cell from the master sheet to fit correctly in the customs document. It needs to be changed so it does not have any carriage returns or "hard returns".

    Does anyone have an idea of how it can be done please?

    Thank you.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: How to alter the format of a referenced cell: from multiple lines/cells to one line.

    If you have an address in A1 this will replace the line breaks with commas:

    =SUBSTITUTE(A1,CHAR(10),", ")
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-30-2015
    Location
    Beijing, China
    MS-Off Ver
    2007
    Posts
    9

    Re: How to alter the format of a referenced cell: from multiple lines/cells to one line.

    Thanks Jeff for the quick reply.

    I am not sure that is going to work.

    I have attached the sheet that I am making to try to make things clearer.

    The cell in the last sheet called "Customs" is the one I am having trouble with. I need to get the address to fit into that space somehow.
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: How to alter the format of a referenced cell: from multiple lines/cells to one line.

    Isn't this what you described? I applied my formula to your label cell on Customs. See attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-30-2015
    Location
    Beijing, China
    MS-Off Ver
    2007
    Posts
    9

    Re: How to alter the format of a referenced cell: from multiple lines/cells to one line.

    Hi Jeff

    My apologies, that is exactly what I was looking for.

    Thank you for helping so quickly with this, it is really appreciated

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: How to alter the format of a referenced cell: from multiple lines/cells to one line.

    You're welcome!

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Transposing from multiple lines to single line with multiple related columns
    By Seattlites in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-21-2017, 07:32 PM
  2. Replies: 1
    Last Post: 05-06-2016, 08:22 PM
  3. Multiple Cells properties alter using one command
    By inq80 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2015, 09:56 AM
  4. Replies: 0
    Last Post: 06-29-2012, 03:16 PM
  5. macro to format one cell of text line to multiple cell
    By mithil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2010, 11:29 AM
  6. Alter value in one cell alter value in multiple cells
    By Bryan Noqw in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-11-2008, 05:31 AM
  7. [SOLVED] Break cell into multiple lines by line break
    By Chia in forum Excel General
    Replies: 1
    Last Post: 08-20-2006, 01:40 AM

Tags for this Thread

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