Forum Discussion
Ka_ChunL
Sep 16, 2025Copper Contributor
vlookup issue
Hi Expertise,
I have a problem regarding to vlookup issue. I need to use the staff ID prefix which is the first 3 characters (numeric or alphanumeric) of staff ID to lookup the team. I tried to use vlookup or Index and Match or xlookup, unfortunately, still have error. May i ask your help? Thanks
I tried to use left(staff ID,3) or value(left(staff ID,3) to capture staff id prefix.
Staff ID | Staff ID prefix | Team | Staff ID prefix | Team | |
736123 | 736 | HK | 736 | HK | |
736124 | 736 | HK | 73A | JP | |
73A123 | 73A | JP | 73B | KR | |
73B123 | 73B | KR |
How about this:
=XLOOKUP(TRIM(LEFT(A2,3)), TRIM(E2:E4), F2:F4, "Not Found")
1 Reply
How about this:
=XLOOKUP(TRIM(LEFT(A2,3)), TRIM(E2:E4), F2:F4, "Not Found")