Forum Discussion
DetailsByBill
Nov 07, 2019Copper Contributor
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
- mathetesSilver 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
- DetailsByBillCopper Contributor
mathetes The cell that needs be Trimmed contains =CONCAT(B2,", ",A2)
A2 = Last Name, B2= First Name
Did I miss a step?
- Patrick2788Silver Contributor
Formula should begin:
=VLOOKUP(TRIM(B2&", "&A2)
If you think the spaces are in the table_array:
=VLOOKUP("*"&B2&", "&A2&"*",