Consulting

Results 1 to 6 of 6

Thread: Textjoin help needed

  1. #1
    VBAX Regular
    Joined
    Aug 2017
    Posts
    57
    Location

    Arrow Textjoin help needed

    I tried to run this formula in excel

    =TEXTJOIN(",",TRUE,IF(MID($EP3:$ET3,2,255<=6),LEFT($EP3:ET3,1),""))
    but it returns error. Here in the range EP3:ET3, I have values like (L1,L2,R1,R22,R30) etc. basically alphanumeric values.
    and according to the digital values I try to group letters together with textjoin which I couldn't make it work.

    Can you help me with the formula what is wrong with it, or suggest me an alternative, please? Thanks.

    I have excel 2010 and I use textjoin with vba code.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    Array-enter this (commit to the sheet using Crtl+Shift+Enter, not just Enter):
    =TEXTJOIN(",",TRUE,IF(VALUE(MID($EP3:$ET3,2,255))<=6,LEFT($EP3:ET3,1),""))
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Regular
    Joined
    Aug 2017
    Posts
    57
    Location
    Thank you, P45scal. Your formula works!! I have an additional question if you don't mind.

    =TEXTJOIN(",",TRUE,IF(VALUE(MID($EP3:$ET3,2,255))>=7*VALUE(MID($EP3:$ET3,2,255))<=12,LEFT($EP3:EU3,1),""))
    When I tried it between the ranges with *, it didn't work. What should i do to use the formula between the ranges? instead of just <=6, between 7 and 12 for example.

  4. #4
    VBAX Regular
    Joined
    Aug 2017
    Posts
    57
    Location
    I tried to use and() too, but it doesn't work either.

  5. #5
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    Try, array-entered:
    =TEXTJOIN(",",TRUE,IF((VALUE(MID($EP3:$ET3,2,255))>=7)*(VALUE(MID($EP3:$ET3,2,255))<=12),LEFT($EP3:ET3,1),""))
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  6. #6
    VBAX Regular
    Joined
    Aug 2017
    Posts
    57
    Location
    Thank you, P45cal. It works. Thanks for your time and help!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •