LOOKUP does not work with MID when a number

G

Guest

=LOOKUP(A2,C3:D4)
WHERE A2 cell is =MID(A1,ROW($4:$4),1)
C3=0
D3=A
C4=A
D4=0
When text in A1 = ABC0123 the lookup value returns an error (#N/A). If the 0
is replaced by a letter the value for the LOOKUP returns an A, which is what
I want.

The question: How can I get the LOOKUP cell to return a value when a number
is entered? I've already tried =LOOKUP(VALUE(A2),C3:D4)) and it gives me a
value, but then the reverse is true; the LOOKUP cell returns an error if A2
is a letter.

All cells are formatted as text.

Any suggestions would be greatly appreciated!
 
M

Max

Try replacing the formula in A2 with:
=IF(ISNUMBER(MID(A1,ROW($4:$4),1)+0),MID(A1,ROW($4:$4),1)+0,MID(A1,ROW($4:$4),1))

---
 
G

Guest

Thanks Max! It works great! Very slick.


Max said:
Try replacing the formula in A2 with:
=IF(ISNUMBER(MID(A1,ROW($4:$4),1)+0),MID(A1,ROW($4:$4),1)+0,MID(A1,ROW($4:$4),1))
 

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