+ Reply to Thread
Results 1 to 12 of 12

TEXTJOIN Array using IF with nested AND

  1. #1
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    TEXTJOIN Array using IF with nested AND

    I have a list with Date, Unit#, and Error Code. I am trying to use TEXTJOIN to pull every Error code in the list that has the same Unit# and Date.
    I am using an array formula and I did Ctrl+Shift+Enter.

    This formula works, it outputs all error codes for the unit
    {=TEXTJOIN(",",TRUE,IF(List!B:B="unit1",List!C:C,""))}

    This formula works, it outputs all error codes for the date
    {=TEXTJOIN(",",TRUE,IF(List!A:A="Feb 1",List!C:C,""))}


    This is my formula that isn't working
    {=TEXTJOIN(",",TRUE,IF(AND(List!B:B="unit1",List!A:A="Feb 1"),List!C:C,""))}

    I'm guessing it's a limitation on the AND formula being able to use an array. Anybody have any suggestions? Please and thanks!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: TEXTJOIN Array using IF with nested AND

    1. Please read the yellow banner and attach a small sample sheet.

    2. please update your profile. If you have TEXTJOIN, you are no longer using Excel 2016 or earlier.
    Attached Images Attached Images
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    Re: TEXTJOIN Array using IF with nested AND

    Sorry, that was the one I had when I join the forum. I'll get right on that. Any suggestion for my formula issue?
    Thanks

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: TEXTJOIN Array using IF with nested AND

    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

  5. #5
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    Re: TEXTJOIN Array using IF with nested AND

    see attached
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: TEXTJOIN Array using IF with nested AND

    In B2 copied across and down:

    =IFERROR(TEXTJOIN(",",,FILTER(List!$C$2:$C$10,(List!$A$2:$A$10=B$1)*(List!$B$2:$B$10=$A2))),"")
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    Re: TEXTJOIN Array using IF with nested AND

    FILTER doesn't seem to be a formula in 2019.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: TEXTJOIN Array using IF with nested AND

    Ah! Sorry - forgot you have 2019 and not 365.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: TEXTJOIN Array using IF with nested AND

    Use this:

    =TEXTJOIN(", ",,IF(List!$B$1:$B$100=$A2,IF(List!$A$1:$A$100=B$1,List!$C$1:$C$100,""),""))

    DO NOT use whole column references. Use something sensible, but future-proof.

    You seem to be using an older version of Excel than me. So, please refer to the attached file. If the formulae are enclosed within a pair of { }, these are array formulae.

    These are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see the curly brackets { } appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-21-2017
    Location
    Missouri, USA
    MS-Off Ver
    2007 through 2019
    Posts
    71

    Re: TEXTJOIN Array using IF with nested AND

    thanks, that works. I was really stuck on wanting to use that AND instead of thinking around the problem differently.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: TEXTJOIN Array using IF with nested AND

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  12. #12
    Registered User
    Join Date
    02-15-2022
    Location
    india
    MS-Off Ver
    2013
    Posts
    2

    Re: TEXTJOIN Array using IF with nested AND

    THIS IS JUST A LITTILE TRY TO JOIN TEXT ON CODITIONAL BASIS IN EXCEL


    Please Login or Register  to view this content.
    Mod Note: You need to wrap code in code tags here - I have done it for you this time.
    Last edited by AliGW; 02-15-2022 at 10:23 AM.

+ 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. [SOLVED] TEXTJOIN in a Spill Array Formula
    By DJunqueira in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-12-2021, 02:33 PM
  2. TEXTJOIN and IF Array
    By mrmacs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-12-2021, 08:51 AM
  3. Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings
    By MikeA01730 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-18-2019, 01:24 AM
  4. TEXTJOIN array for cells with functions in them (bug?)
    By Allerdrengen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-02-2018, 05:24 AM
  5. [SOLVED] How can I modify my array TEXTJOIN formula to output only unique values
    By Victorjo in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-06-2018, 01:50 AM
  6. Is it possible a nested array within an array formula?
    By Zapillo in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-19-2016, 09:29 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