Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - function to find result from table

Status
Not open for further replies.

sandpi

Technical User
Nov 13, 2007
5
CA
Hi,

I want to create a function in excel that would do the following :

I have a reference table like this :

A B C D
----------------------
X - 7 8 10 13
Y - 6 9 14 4
Z - 56 37

I have, for example, cell A1 = B
cell A2 = Y

I want a function in cell A3 that will do "If letter in first column is equal to value in cell A2, and letter in first row is equal to value in cell A1, than cell A3 is equal to (in this case : 9)
 


Hi,

I gave the table the Range Name RefTbl
I gave the Y, Y, Z range a Range name of RefCol1
[tt]
=INDEX(RefTbl,CODE("B")-64, MATCH(A2,RefCol1,0))
[/tt]


Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 




Sorry, had my arguments reversed...
[tt]
=INDEX(RefTbl,MATCH(A2,RefCol1,0),CODE(A1)-64)
[/tt]


Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top