How to determine first two numbers in number for a range of data

  • Hi guys, I'd like to have a code which will determine first two numbers and assign them some value. For instance I will have number 123456 so the function will pick first two numbers (12) and assign them value "KLPOOP", for number 985632 (first two numbers are 98) it will assign "LOOOP" and so on.. I managed to do it for one number with Mid function however it's not working for range of data (dozens of 6 digit numbers). Any suggestions please?

  • Welcome to the forum!


    Normally, I would use an array for such.


    Replace a,b,c,d, etc. with your variable names.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!