+ Reply to Thread
Results 1 to 5 of 5

Joining text in multiple cells toegther in VBA

  1. #1
    Valued Forum Contributor
    Join Date
    01-10-2011
    Location
    swindon, england
    MS-Off Ver
    Excel 2010
    Posts
    317

    Joining text in multiple cells toegther in VBA

    HI,

    I am creating a macro which lists the locations of different printers. So far the macro opens a sheet and using a printer number it filters a list in one sheet and copies and pastes the results into a sheet. However what I then want it to do is in cell A1 of the same sheet I want it to say If there is more than 1 result take all the locations and merge them into a one sentance broken up by a comma.

    Does anyone know how to do this??

    Thank you

    Jeskit

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Joining text in multiple cells toegther in VBA

    Is it possible to dummy file with before and after format.

  3. #3
    Valued Forum Contributor
    Join Date
    01-10-2011
    Location
    swindon, england
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Joining text in multiple cells toegther in VBA

    Not sure I quite understand your request but I have attached a workbook which has two sheets, the printer sheet shows the list which will be filtered and sheet 1 shows what I want shown after the macro has finsihed

    Thanks for replying!!

    Book2.xlsx

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Joining text in multiple cells toegther in VBA

    try this (see attachment)
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    01-10-2011
    Location
    swindon, england
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Joining text in multiple cells toegther in VBA

    hI,

    Thanks for the help however i am not sure i understand what your code is doing.

+ 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