writing a formula to distinguish a letter and a number

N

noel

How do a write a forumla so that is the input is a letter, then look up
values in a table. If the input is a number, than just accept the number.

example:
Table:
a=1
b=2
c=3
Formula;
if input = a, then look up the value of a in a table, which is 1
if input =9, then just keep the input 9 as the result
 
M

Mike H

Hi,

Try this
=IF(ISNUMBER(C1),C1,VLOOKUP(C1,A1:B6,2,FALSE))

Assumptions
Input number/letter is in C1
Lookup table is in A1 to B6


Mike
 
B

Beege

noel,

I think validation and a drop down might be your best bet here. Or an
event macro using VBA that changes your input after leaving the cell.

Unless of course the input is in one cell and the desired output is in a
different cell...

Beege
 

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