Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default writing a formula to distinguish a letter and a number

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default writing a formula to distinguish a letter and a number

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

"noel" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 66
Default writing a formula to distinguish a letter and a number

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

noel wrote:
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a number to a letter of the alphabet to get a letter [email protected] Excel Worksheet Functions 5 May 21st 07 04:25 PM
formula converting number to column letter 26 KR Excel Worksheet Functions 5 March 2nd 06 04:29 PM
Help to write a formula using a letter value and a number value Ikeagle Excel Worksheet Functions 3 January 29th 06 12:44 AM
change headers from letter to number/number to letter lazybee Excel Worksheet Functions 1 July 29th 05 11:08 PM
column header changed from letter to number, how return to letter Ron Excel Discussion (Misc queries) 2 May 9th 05 08:34 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"