+ Reply to Thread
Results 1 to 19 of 19

Combine multiple cells & ignoring blanks

  1. #1
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Question Combine multiple cells & ignoring blanks

    Hi everyone

    I have two rows/columns, B14:B24 and C14:C24.

    The cells in column B show either TRUE or FALSE.
    The cells in column C shows text when the adjacent cell in column B = True.

    In cell E26 (merged to be the same amount of rows as the info in B and C) I want to combine the text which populated in column C but don't want it to include any blank cells from C.
    I'd like each row of text to be on a different line within E26 also.

    Thanks for your help

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: Combine multiple cells & ignoring blanks

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    A before sheet would just be the exact info listed above and I'm not sure what you mean by "after" sheet, If I had and "after" anything I would not need the help.
    No idea where "Go Advanced" is either

    I have attached a visual version of what was in my question though
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: Combine multiple cells & ignoring blanks

    I can't put the data in box as you have, but below is some VBA code that will put the data in Column E in the first unused cell.

    Please Login or Register  to view this content.
    Alternatively, you could filter the range on column B to only show TRUE and then copy and paste to "box"

  5. #5
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    VBA and just first empty box wont work for me and the copy/paste option is too messy, I need the main box to update as the true/false boxes change.

    Thanks for those ideas though

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple cells & ignoring blanks

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    Sorry, I meant I don't want a VBA option, not that the one provided doesn't work.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple cells & ignoring blanks

    The you need to have a string of concatenate IF statements.

  9. #9
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    Yep. But nothing I've tried so far works to look like the attachment.

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Combine multiple cells & ignoring blanks

    Quote Originally Posted by mrbret View Post
    Yep. But nothing I've tried so far works to look like the attachment.
    It would be an easy task if you have access to Excel Office 365 subscription.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  11. #11
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    Nope, just Excel 2013, that's what they use at work.


    Anyone have any ideas / solutions of a formula that would do this?

  12. #12
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Combine multiple cells & ignoring blanks

    You could use concatenated values with char(10) but you have to pick cells manually.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    I just tried that, but if a TRUE changes to a FALSE it leave a Blank line in the main box and if a FALSE change to a TRUE it ignores any words in the related C column

  14. #14
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Combine multiple cells & ignoring blanks

    Quote Originally Posted by mrbret View Post
    I just tried that, but if a TRUE changes to a FALSE it leave a Blank line in the main box and if a FALSE change to a TRUE it ignores any words in the related C column
    You have received help with VBA solutions. Please understand that those are your only options. There are no formula options unless you use Office 365.

  15. #15
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    Ok thanks, but as you can see, at no point until now has anyone said it cant be done.

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple cells & ignoring blanks

    If you are happy to use a"helper" column

    in J2

    =IFERROR(INDEX($C$2:$C$12,SMALL(IF($B$2:$B$12=TRUE,ROW($B$2:$B$12)-ROW($B$2)+1,""),ROWS($B$2:B2))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    then copy down

    Unmerge E2 then

    =J2&CHAR(10) &IF(J3<>"",J3&CHAR(10),"")&IF(J4<>"",J4&CHAR(10),"")&IF(J5<>"",J5&CHAR(10),"")&IF(J6<>"",J6&CHAR(10),"")&IF(J7<>"",J7&CHAR(10),"")&IF(J8<>"",J8&CHAR(10),"")&IF(J9<>"",J9&CHAR(10),"")&IF(J10<>"",J10&CHAR(10),"")&IF(J11<>"",J11&CHAR(10),"")

    then select cells and merge to get your box.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    Thanks VERY much John, that works perfectly. I really appreciate your help.

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Combine multiple cells & ignoring blanks

    You're welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  19. #19
    Registered User
    Join Date
    02-05-2015
    Location
    Ohio
    MS-Off Ver
    Excel
    Posts
    38

    Re: Combine multiple cells & ignoring blanks

    Done. Thanks again

+ 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. Combine Dates from 10 Columns While Ignoring Blanks
    By DKGODFREY in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2014, 11:50 AM
  2. SUM last 6 cells with data (ignoring blanks in between)
    By cjohnwalsh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2014, 08:24 AM
  3. sum cells ignoring ones with blanks
    By kiwiingrid in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-04-2012, 06:03 PM
  4. [SOLVED] max if multiple conditions, ignoring blanks
    By robotlust in forum Excel General
    Replies: 6
    Last Post: 05-29-2012, 07:38 PM
  5. Multiple IF statements plus ignoring blanks
    By dnewby in forum Excel General
    Replies: 2
    Last Post: 10-31-2011, 12:55 PM
  6. Average ignoring Blanks cells
    By Justinmih in forum Excel General
    Replies: 10
    Last Post: 09-30-2011, 06:21 PM
  7. Excel 2007 : sum cells ignoring blanks and text
    By mickurje in forum Excel General
    Replies: 2
    Last Post: 07-04-2010, 03:00 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