Is it possible to use the RIGHT function with XLOOKUP?
I have the following formula that refuses to work
=XLOOKUP(RIGHT(A2, 3), Sheet1!$A$3:$A$200, Sheet1!$B$3:$B$200, "")
Any alternatives welcome!
To ensure your data and the search pattern, use
=TEXTJOIN(",",TRUE,CODE(MID(RIGHT(A2,3),SEQUENCE(3),1)))=
TEXTJOIN(",",TRUE,CODE(MID(Sheet1!A5,SEQUENCE(LEN(Sheet1!A5)),1)))
where 'Sheet1!A5' is expected cell matches the search pattern.
The formula
=TEXTJOIN(",",TRUE,CODE(MID(str,SEQUENCE(LEN(str)),1)))
provides the list of codes for the given string 'str'.
UPD
If you have numbers in the sought range, use
=XLOOKUP(RIGHT(A2, 3), TEXT(Sheet1!$A$3:$A$200,"#"), Sheet1!$B$3:$B$200, "")
Or, vise versa:
=XLOOKUP(VALUE(RIGHT(A2, 3)), Sheet1!$A$3:$A$200, Sheet1!$B$3:$B$200, "")
RIGHT(A2, 3). This value has to be present inSheet1!$A$3:$A$200without any trailing or leading places. It has to be exact.Sheet1!A5, and try the following formula:=RIGHT(A2, 3)=Sheet1!A5. Maybe share what exactly is in the cells.=XLOOKUP(--RIGHT(A2, 3), Sheet1!$A$3:$A$200, Sheet1!$B$3:$B$200, "")