+ Reply to Thread
Results 1 to 2 of 2

combining text with comma if any of the cells data is present in 3 columns

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    combining text with comma if any of the cells data is present in 3 columns

    Hi,

    I have used below function in Column D

    =CONCATENATE(A2&","&B2&","&C2)

    where I joined 3 columns into one separated by comma.But the problem is that when either of the row does not contain anything,it does show single comma and double comma either at the end or in between.How to get those removed those extra comma.

    Pls do not use VBA.

    With Best Rgds

    suresh
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: combining text with comma if any of the cells data is present in 3 columns

    Try

    =SUBSTITUTE(TRIM(A2&" "&B2&" "&C2)," ",",")

+ 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. Replies: 4
    Last Post: 07-25-2013, 05:28 AM
  2. [SOLVED] How to highlight cells present in ALL columns
    By BEDRoO in forum Excel General
    Replies: 10
    Last Post: 02-20-2013, 06:22 AM
  3. [SOLVED] If any of these cells have text in them put a comma, if there is no text then a comma
    By sharpmel in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-06-2012, 01:43 PM
  4. Comma present then (please help)
    By muffistough in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2012, 07:28 PM
  5. [SOLVED] If comma present, then place a character before and after comma (FORMULA)
    By jaimealvarez in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2012, 04:04 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