To answer the question you sent me privately:
Let's assume B2 contains Chalon/Saone8395
The RIGHT(B2,{1,2,3,4,5,6,7,8,9,10}) part of the formula returns an array of the last 1, 2... and so on characters of the text:
5
95
395
8395
e8395
ne8395
one8395
aone8395
Saone8395
/Saone8395
Negating those with - will return either a negative number or an error:
LOOKUP does two things:
1. It ignores errors, so all those #VALUE! items will simply be ignored.
2. It assumes the data is sorted in ascending order and will return the last value that is less than or equal to the lookup value. Since all the values are negative, they are all less than 1 (which is why using any other positive number will also work). So in this case it returns -8395
The - sign before the LOOKUP then converts that negative number back to a positive: 8395
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.