Lookup?

P

pearce

I'm trying to convert text to numbers and failing, can you help?

I've tried this:

=LOOKUP(N2,{"N","3c","3b","3a","4c","4b","4a","5c","5b","5a","6c","6b","6a","7c","7b","7a"},{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16})

I want the text N in a cell to return the number 1, 3c to return 2, 5c to
return 8, 7a to return 16 etc. I've stared at it for ages and now I'm stuck,
it's not working. Can anyone help?

Many thanks.
 
S

Santipong

Try

=Match(N2,{"N","3c","3b","3a","4c","4b","4a","5c","5b","5a","6c","6b","6a","7c","7b","7a"},0)

Hope this help.
 
D

Duke Carey

The lookup values, N-7c need to be in ascending sort order, so 3a should be
first and N will be last.
 
Top