+ Reply to Thread
Results 1 to 7 of 7

Concatenate non-adjacent cells in one row to one cell

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Concatenate non-adjacent cells in one row to one cell

    Hello everyone
    I have some data in one row (Sheet1.Rows(1)) and I need to concatenate non-adjacent cells in that row in one cell only
    The new output cell would be in special format
    More details:
    Firm name would be first line in bold
    then NAICS Codes
    then Description
    then empty line
    then owner
    then Phone & Fax & Email in one line separated by ; and space
    then Website
    then Address

    * As for Website and Email to be underlined

    I have attached output for more clarification
    Thanks advanced for help
    Attached Files Attached Files
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Concatenate non-adjacent cells in one row to one cell

    I have this UDF that concatenates cells (but for adjacent cells) and at the same time I need to format output so the UDF will not be the suitable solution I think
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Concatenate non-adjacent cells in one row to one cell

    I need to deal with one row and I will do loops for other rows. Please help me

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Concatenate non-adjacent cells in one row to one cell

    Any help in this topic please

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Concatenate non-adjacent cells in one row to one cell

    Hi again Yasser,

    Hope you've been keeping well since our last contact

    Take a look at the attached workbook and see if it does what you need.

    It uses a helper Column (N) on the Company Details worksheet. This contains a formula which concatenates the various values and adds the New Line character where appropriate.

    The various columns have been defined as named ranges - this makes it easier to understand the formula used.

    The VBA code takes the text value from this helper column, adds the required Bold and Underline attributes, and inserts the formatted value in the appropriate cell on the Output worksheet.

    The Output worksheet contains two buttons - one to clear the worksheet and one to populate it with the required data.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Concatenate non-adjacent cells in one row to one cell

    Thank you very much Mr. Greg for this fascinating solution
    You are perfect.
    Thanks a lot for great and wonderful help

    Best Regards

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Concatenate non-adjacent cells in one row to one cell

    Hi again Yasser,

    Many thanks for your feedback, for your kind words, and also for the Reputation increase - much appreciated

    You're very welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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. Concatenate non-adjacent cells
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-26-2016, 02:11 PM
  2. Concatenate adjacent cells based upon cell value
    By michael.reynolds1775 in forum Excel General
    Replies: 10
    Last Post: 11-05-2014, 09:41 PM
  3. Macro to concatenate cells adjacent to duplicates
    By tkellymc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-16-2013, 07:38 PM
  4. Concatenate multiple cell values based on matching adjacent cells
    By mkrzy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2013, 02:40 AM
  5. [SOLVED] Macro to concatenate cells adjacent to duplicates
    By 084851 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2013, 09:18 AM
  6. Concatenate non-adjacent cells without duplicates
    By turningitred in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-18-2009, 11:08 AM
  7. [SOLVED] How to concatenate adjacent cells in a range without using &?
    By Ark in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-16-2005, 02:05 PM

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