+ Reply to Thread
Results 1 to 7 of 7

Conditional TEXTJOIN

  1. #1
    Registered User
    Join Date
    02-24-2019
    Location
    UK
    MS-Off Ver
    MS 365 PC & Mac (assume PC unless otherwise stated in post)
    Posts
    96

    Conditional TEXTJOIN

    I am trying to create a hyperlink to email several email addresses using the textjoin function, but I get the #VALUE error if the number of occurrences is exceeding a certain limit

    Please see attached, the formula for Department B (with 13 instances) works fine, but for Department A (with 15 instances) does not work.

    This is the formula I am using

    =HYPERLINK("mailto:"&TEXTJOIN("; ",TRUE,IF(Table1[Department]=D3,Table1[Colleague Email],"")),"Email "&D3)

    It is entered as an array formula (Ctrl + Shift + Enter)

    If TextJoin is not suitable for this (potentially 50 occurrences), then would appreciate suggestions of alternative method.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-28-2021
    Location
    China
    MS-Off Ver
    O365
    Posts
    111

    Re: Conditional TEXTJOIN

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Conditional TEXTJOIN

    the issue is not TEXTJOIN but the 255 char limit on the HYPERLINK address itself, e.g.

    =HYPERLINK("mailto:"&REPT("z",248)) -> mailto:zzzzz...
    =HYPERLINK("mailto:"&REPT("z",249)) -> #VALUE!

    so, following above, if you swap your delimiter from ;space to ; (thus saving space) your first calc will work, but how scalable this is in real life is debatable, of course.

    FWIW, whilst it doesn't fix your issue, if you're using TEXTJOIN you can remove the Array by using FILTER (and UNIQUE to remove dupes should they exist)

    =HYPERLINK("mailto:"&TEXTJOIN(";",,UNIQUE(FILTER(Table1[Colleague Email],Table1[Department]=D2))),"Email "&D2)

  4. #4
    Registered User
    Join Date
    02-24-2019
    Location
    UK
    MS-Off Ver
    MS 365 PC & Mac (assume PC unless otherwise stated in post)
    Posts
    96

    Re: Conditional TEXTJOIN

    @ben8563 Thank you for the proposal, as far as I can see the only change you make is to remove space from the delimiter? Whilst this does allow me to get one more occurrence in (I guess indicating the issue is with the length of the string), I still get the error when the occurrences continue to grow.

  5. #5
    Registered User
    Join Date
    02-24-2019
    Location
    UK
    MS-Off Ver
    MS 365 PC & Mac (assume PC unless otherwise stated in post)
    Posts
    96

    Re: Conditional TEXTJOIN

    Thanks @XLent for the pointers, now I know the issue I can explore possible solutions.

  6. #6
    Forum Contributor
    Join Date
    03-28-2021
    Location
    China
    MS-Off Ver
    O365
    Posts
    111

    Re: Conditional TEXTJOIN

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    have a try

  7. #7
    Registered User
    Join Date
    02-24-2019
    Location
    UK
    MS-Off Ver
    MS 365 PC & Mac (assume PC unless otherwise stated in post)
    Posts
    96

    Re: Conditional TEXTJOIN

    @ben8563, thank you for the suggestion, I could not get it work unfortunately, I think I need to update my Excel (did not recognise PHONETIC function).

    In the meantime I come up with a work around to solve my original problem to a satisfactory level, basically if the string is less than or equal to 255 characters the Hyperlink works as intended, if it is greater than 255 then I just prompt the user to copy email addresses from another cell and paste directly into an email. For me this is fine.

    I know I could have solved this with VBA, but would rather avoid that as my file is likely to end up on SharePoint, and that does not support macros.

    Below is my solution and I reattach workbook with it for anyone that is interested;

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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 Alternative
    By getafixkwik in forum Excel General
    Replies: 10
    Last Post: 04-05-2020, 11:28 AM
  2. TEXTJOIN issues
    By Daniel_ISS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-04-2019, 01:08 AM
  3. [SOLVED] TEXTJOIN and keep formatting
    By ihb95 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-09-2019, 03:16 AM
  4. Textjoin and if function need help
    By bitozi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2019, 06:35 AM
  5. [SOLVED] Textjoin + condition
    By veeejay in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-04-2019, 01:23 PM
  6. Textjoin?
    By johandenver in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 10-01-2017, 03:18 PM
  7. TEXTJOIN function
    By Tony Valko in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2016, 06:48 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