In table A I have a list of codes that contain a numerical component after 1-3 letters. I need to use the numerical value to find the corresponding year via the ranges detailed in table B.
Table A: Table B:
Code Year Value Min Value Max Year
AC19 ? 0 10 2011
ABC2 ? 11 20 2012
AC12 ? 21 30 2013
AFC30 ? 31 40 2014
GXC0 ? 41 50 2015
To separate out the number I have been using:
=(RIGHT(B7,LEN(B7)-(FIND("C",B7)+0)))
(Where B7 in this case is the first code in the table)
This works well as all codes have a C before the numerical component.
I found that using example numerical segments (without using the above formula) I could use VLOOKUP with the "True" flag. However when I attempted to run it using the numerical value generated with the above formula I got a #Ref! error.
Why would VLOOKUP suddenly stop working when using data collected from the formula above?
The ideal output would be:
Code Year
AC19 2012
ABC2 2011
AC12 2012
ACF30 2013
GXC0 2011
Aucun commentaire:
Enregistrer un commentaire