+ Reply to Thread
Results 1 to 2 of 2

Joining text strings with "some" formatting in Excel 2008

Hybrid View

  1. #1
    Registered User
    Join Date
    02-04-2008
    Posts
    27

    Joining text strings with "some" formatting in Excel 2008

    I'm trying to join 30 individual text stings (each in a different cell, so concatenate might work) into one cell to facilitate printing. My goal is for the final cell to contain all of the original strings, each separated by a line return, with extra space from empty cells eliminated (to print as part of a report). I'm also working with Excel 2008 for the mac which no longer supports macros (ARGH!!).

    Any thoughts would be appreciated!

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Would something like the below work ?

    Assumes you don't have ^ in any of your 30 strings...

    =SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(A1," ","^")&" "&SUBSTITUTE(A2," ","^")&" "&SUBSTITUTE(A3," ","^")...)," ",CHAR(10)&CHAR(13)),"^"," ")
    Below is obviously limited to show just 3 cells (else we'd be putting up a LONG formula), in essence for each cell you want to replace the ... with the remaining cells where for each remaining cell you have:

    &" "&SUBSTITUTE(Ax," ","^")
    where Ax is the cell reference of the cell you're concatenating.

    You will need to ensure result cell is set to have Wrap Text on... and obviously set the height of the row accordingly.

    I think that might work... I don't have 2008 I'm afraid so I can't test...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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