look up value with maximum digits matching but that is smaller

Joined
Oct 9, 2013
Messages
1
Reaction score
0
Hello,

I am trying to find the value with the highest number of matching digits but that is smaller than my expression. I am trying with the Index function but can't make it work.

These are my reference :
Code Id.
44010000 176
44011000 3
44012100 2
44012200 4
44013100 5
44013900 6
44030000 177
44032000 194

Now I have the following number for which I want to find the id :
44013010

The result I want to get is id 176 because there is a match on the first 5 digits for 44013100 but 44013100 is higher 44013010, so I refuse that match and need to match on 4 digits on 44010000.

Can anyone help?

Thanks,
Bardi.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top