Hi there! It looks like you're trying to use the
function in Excel to lookup values based on the
last 6 characters in a cell. Your formula is close, but you just need to make a small adjustment.
Instead of using the
function to extract the last 6 characters, you can use the
function to extract characters from the middle of a string. Here's the formula you can use:
Formula:
=VLOOKUP(MID(A4,LEN(A4)-5,6),$J$4:$K$7,2,FALSE)
Let me break down this formula for you:
- MID(A4,LEN(A4)-5,6) extracts 6 characters starting from the 6th character from the end of the string in cell A4. The function returns the length of the string, so gives you the position of the 6th character from the end, and 6 is the number of characters to extract.
- $J$4:$K$7 is the range of cells you want to search for the lookup value.
- 2 is the column number in the lookup range that contains the values you want to return.
- FALSE means you want an exact match for the lookup value.
Make sure to adjust the lookup range to include all the values you want to search, and adjust the column number to match the column that contains the values you want to return.