+ Reply to Thread
Results 1 to 5 of 5

Concatenate cells on same row ignoring blank cells

Hybrid View

  1. #1
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    Concatenate cells on same row ignoring blank cells

    Hi,

    Trying to concatenate multiple cells on same row and separating value of each cell with a semicolon ( in between but not if previous column cell(s) is(are) blank.

    I have attached a sample file to make it clear.

    Happy New Year!
    RJ

    PS
    I do have a separate issue which I'll post later, if this formula does not give me clues how to solve the other problem.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,329

    Re: Concatenate cells on same row ignoring blank cells

    Try using TEXTJOIN. https://support.microsoft.com/en-us/...3-0e8fc845691c
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    Re: Concatenate cells on same row ignoring blank cells

    Thank you Trevor. Happy New Year.

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Concatenate cells on same row ignoring blank cells

    Meanwhile, TEXTJOIN should be available in EXCEL 2019.

    If that's correct, please try:
    Formula: copy to clipboard
    =TEXTJOIN(";",,IF(H2<>"",H2&"-"&MIN(1,Q2),""),CT2:CW2)

  5. #5
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    [SOLVED] Re: Concatenate cells on same row ignoring blank cells

    Quote Originally Posted by HansDouwe View Post
    Meanwhile, TEXTJOIN should be available in EXCEL 2019.

    If that's correct, please try:
    Formula: copy to clipboard
    =TEXTJOIN(";",,IF(H2<>"",H2&"-"&MIN(1,Q2),""),CT2:CW2)
    Hans, thank you so much for your very quick response.

    Your formula worked except the MIN function will always returns 1 no matter what is in column Q
    =TEXTJOIN(";",,IF(H2<>"",H2&"-"&MIN(1,Q2),""),CT2:CW2)

    I modified it to this and it works as needed.
    =TEXTJOIN(";",,IF(H2<>"",H2&"-"&Q2,"1"),CT2:CW2)

    Happy New Year.

+ 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. Highlight all duplicate cells ignoring blank cells
    By Vivek2705 in forum Excel General
    Replies: 10
    Last Post: 05-22-2024, 04:54 PM
  2. How to automatically copy cells ignoring blank cells
    By dtpunshon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2020, 12:20 PM
  3. [SOLVED] shuffle names in cells, ignoring blank cells, macro
    By NAikenhead in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-14-2018, 03:40 PM
  4. Replies: 3
    Last Post: 07-24-2017, 01:41 PM
  5. [SOLVED] Rank string ignoring blank cells and o value cells
    By BRISBANEBOB in forum Excel General
    Replies: 3
    Last Post: 03-02-2014, 12:56 AM
  6. Replies: 5
    Last Post: 01-24-2013, 06:29 AM
  7. Replies: 0
    Last Post: 04-07-2009, 04:42 PM

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