+ Reply to Thread
Results 1 to 10 of 10

Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

  1. #1
    Registered User
    Join Date
    04-15-2019
    Location
    Bedford
    MS-Off Ver
    Office 16
    Posts
    7

    Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    Hi,

    I have a spreadsheet that contains survey responses about meetings. Each completed survey form from Survey Monkey is represented in a row in sheet Responses. There are multiple meetings and multiple responses per meeting. Responses!B2:B1000 contains an integer identifying the meeting (e.g. 4 indicates "Mike's talk on image sharpness") and Responses!H2:H1000 contains optional comments on that meeting. I want to list all the comments about a particular meeting in a cell. I thought that this array formula (e.g. with $A$5 = 7 for meeting 7) would do it:
    {=TEXTJOIN(CHAR(10),TRUE,IF(Responses!B2:B1000=$A$5,Responses!H2:H1000,""))}
    But it doesn't: I get a #VALUE! error. However this array formula (removing the IF conditional expression so comments about EVERY meeting are included) works:
    {=TEXTJOIN(CHAR(10),TRUE,IF(TRUE,Responses!H2:H1000,""))}
    I don't understand what's wrong with the test. Can anyone tell me how to make this work?

    TEXTJOIN isn't included in my Office 2016 so I added it via a User Defined Function as suggested by mehmetcik in topic #1272684 "TEXTJOIN missing from MS Office Home and Student 2016 " above.

    Thanks,
    Mike

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    You'd need to post the TEXTJOIN UDF code.

    Formula shipped with Office 365 subscription will work with syntax indicated in your post.

    I assume the issue is somewhere within UDF code.

    0.JPG
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    04-15-2019
    Location
    Bedford
    MS-Off Ver
    Office 16
    Posts
    7

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    CK76,

    Here it is:

    Please Login or Register  to view this content.
    Thanks,
    Mike
    Last edited by AliGW; 04-16-2019 at 05:21 PM.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    Hmm, works fine on my end. I tested it by renaming it to TEXTJOIN2, to avoid ambiguity.
    0.JPG

    I've also debugged code using watch window and locals window. All worked as expected.

    May be upload sample workbook where you get #Value error when using TEXTJOIN UDF.

    FYI - Please use <> Code tag button to post codes.

  5. #5
    Registered User
    Join Date
    04-15-2019
    Location
    Bedford
    MS-Off Ver
    Office 16
    Posts
    7

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    CK76,

    It working for you makes me think I've made some "dumb" error but I just spent a little time rechecking and I can't see it.

    I've attached the worksheet. The cell I'm using is A8 in sheet "Meeting Comments new". My goal is to replace sheet "Meeting Comments" in which I created a lot of individual cell references manually to achieve the effect I want.

    Thanks for looking at this.

    Mike

  6. #6
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,843

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    This formula throws an error if you do it full array and if LEN(H) is larger than 255:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This seems to be the underlying error but I have no idea of how to solve it.
    Attached Files Attached Files
    Last edited by Jacc; 04-17-2019 at 05:01 AM.

  7. #7
    Registered User
    Join Date
    04-15-2019
    Location
    Bedford
    MS-Off Ver
    Office 16
    Posts
    7

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    Jacc and CK76,

    Thanks for taking the time to look into this.

    It looks right now like I'm stuck because I need more than 255 rows.

    Does anyone else have any ideas on how to get past this problem? Is there something to change in the TEXTJOIN Function?

    Or, is there a different approach I should try?

    Thanks,
    Mike

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    Hmm, not sure why you are having issues.

    Tested with your sample. Had no issues on my machine using UDF Textjoin (as previous, I renamed it Textjoin2).

    EDIT: Ah never mind, its the If part that's causing issue. Let me check something...
    Attached Images Attached Images
    Last edited by CK76; 04-17-2019 at 04:50 PM.

  9. #9
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    Hmm, I think you can do it in two stages. First extract list of responses that meet condition into some range. Then use that range as source for your textjoin range.

  10. #10
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,843

    Re: Error Using TEXTJOIN Function in Array Formula to List Non-empty Strings

    Quote Originally Posted by MikeA01730 View Post
    Jacc and CK76,

    Thanks for taking the time to look into this.

    It looks right now like I'm stuck because I need more than 255 rows.

    Does anyone else have any ideas on how to get past this problem? Is there something to change in the TEXTJOIN Function?

    Or, is there a different approach I should try?

    Thanks,
    Mike
    Sorry for being unclear, the limit is not 255 rows, it's 255 characters in any of the cells that are to be joined.
    It's quite clear if you look into the workbook I posted.
    Last edited by Jacc; 04-18-2019 at 01:26 AM.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

+ 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. 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
  2. [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
  3. [SOLVED] TextJoin formula with MID function
    By Brsth in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-26-2018, 11:00 AM
  4. TEXTJOIN function
    By Tony Valko in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2016, 06:48 PM
  5. using the split function on an array of strings
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-31-2013, 12:52 AM
  6. Datalabel.Text randomly returns empty strings in a recursive function
    By Miragel in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-17-2012, 06:17 PM
  7. search for a part of string within an array of strings from another array list
    By jdonohue in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2011, 01:32 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