Forum Discussion

DetailsByBill's avatar
DetailsByBill
Copper Contributor
Nov 07, 2019

Use results of =CONCAT(B2,", ",A2) for a Vlookup Table Array Target

I'm using a =Cocat to combine the first name and last name fields followed by a comma and space. The results are a target array for a Vlookup. I'm getting a #NA error on the Vlookup. I know that many of the names I'm looking for are in the array.  

 

Any thoughts on what's going on?

4 Replies

  • mathetes's avatar
    mathetes
    Silver Contributor

    Try TRIM function to eliminate any trailing space from target array elements

    my experience is that it’s often “invisible” things like trailing spaces that trip up VLOOKUP

    • DetailsByBill's avatar
      DetailsByBill
      Copper Contributor

      mathetes The cell that needs be Trimmed contains =CONCAT(B2,", ",A2)

       

      A2 = Last Name, B2= First Name 

      Did I miss a step?

      • Patrick2788's avatar
        Patrick2788
        Silver Contributor

        DetailsByBill 

         

        Formula should begin:

         

        =VLOOKUP(TRIM(B2&", "&A2)

         

        If you think the spaces are in the table_array:

        =VLOOKUP("*"&B2&", "&A2&"*",

Resources