Forum Discussion

renjie0315's avatar
renjie0315
Tin Contributor
Feb 17, 2023

VLookup with Comma Interval

Hi all, 

 

I would like to use VLookup to abstract the phone number and email based on the name given in cell B3 and subsequent column. However, in between the name, there is a comma, may I know is there any method to achieve this?

 

 

9 Replies

  • FikturFox's avatar
    FikturFox
    Brass Contributor

    renjie0315 
    Perhaps with M365...
    =SORT(UNIQUE(WRAPROWS(TOCOL(WRAPCOLS(TOCOL(TEXTSPLIT(TEXTJOIN("♡",1,B3:D4),{"♡",", "})),2),,FALSE),3)))

    • renjie0315's avatar
      renjie0315
      Tin Contributor

      Hi Riny_van_Eekelen,

      I have downloaded your excel file. However, I can't find any formula or method that you have done, it's a plain file basically. Would you mind to show me where can I locate it?

  • ecovonrein's avatar
    ecovonrein
    Iron Contributor

    =INDEX(TEXTSPLIT(TBL[Name],","),1,1). You might need =TRIM too.

    • renjie0315's avatar
      renjie0315
      Tin Contributor
      Hi ecovonrein,

      May I know what is TBL[Name]? It shows there's a problem with this formula. May I know how should I solve this?
      • renjie0315's avatar
        renjie0315
        Tin Contributor

        Hi ecovonrein,

         

        I presume TBL stands for Table. This is the error that I faced when I select the table.