The (a$2:A$2493) in the match. Is the list of codes i have. From memory a proper array formula you have to finish it with shift ctrl enter (something like that)
I was original going to do a vlookup but had a problem as data often has to remain on the same lines to return correct results. This can be a problem with end of the day data when a new code is added or change of name.
Here is a picture of the to excels so you can see how it works