ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formula (https://www.excelbanter.com/excel-worksheet-functions/90128-formula.html)

Buttercup

formula
 
Please help me write a formula that will allow me to type any one of the
values in the left column in the key below in a blank cell and give a
numerical value that corresponds to key in the adjacent cell next to the
blank cell.

For example if I type GM in a blank cell I want the cell to the right to
give me 1.0. (Also in that same cell if I type any of the other items in the
column on the left I want it to give me the number that corresponds to it.

Here is part of the key (there are other items that will have corresponding
numbers ranging from 0 to 1.25):

GM 1.0
W4 1.0
D5 0.5
3M 1.25
4M 1.0
PO 1.0
RO 1.0
MSB 1.0
NICL 1.0
DPO 1.0


Thanks,
Buttercup

CLR

formula
 
Assuming your list is in F1:G10, then put this formula in B1 and type the
code value in A1

=VLOOKUP(A1,F1:G10,2,FALSE)


Vaya con Dios,
Chuck, CABGx3


"Buttercup" wrote:

Please help me write a formula that will allow me to type any one of the
values in the left column in the key below in a blank cell and give a
numerical value that corresponds to key in the adjacent cell next to the
blank cell.

For example if I type GM in a blank cell I want the cell to the right to
give me 1.0. (Also in that same cell if I type any of the other items in the
column on the left I want it to give me the number that corresponds to it.

Here is part of the key (there are other items that will have corresponding
numbers ranging from 0 to 1.25):

GM 1.0
W4 1.0
D5 0.5
3M 1.25
4M 1.0
PO 1.0
RO 1.0
MSB 1.0
NICL 1.0
DPO 1.0


Thanks,
Buttercup


SteveG

formula
 

In the adjacent cell (in this case G1) to your text "GM" where your
table is in A1:B10.

=IF(ISNA(VLOOKUP(F1,A1:B10,2,FALSE)),"",VLOOKUP(F1 ,A1:B10,2,FALSE))

This returns a blank if the value is not found in the table.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=544770



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com