ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   lookup matrix (https://www.excelbanter.com/excel-discussion-misc-queries/230891-lookup-matrix.html)

jack

lookup matrix
 
I have the following matrix. I'm given the values of C and bb
How would i write a macro to get the result? which is 8.

aa bb cc
A 1 2 3
B 4 5 6
C 7 8 9
D 10 11 12
E 13 14 15

thanks
Jack

smartin

lookup matrix
 
Jack wrote:
I have the following matrix. I'm given the values of C and bb
How would i write a macro to get the result? which is 8.

aa bb cc
A 1 2 3
B 4 5 6
C 7 8 9
D 10 11 12
E 13 14 15

thanks
Jack


With your data in A1:B6 here is a worksheet function that will do it.

=INDEX(B2:D6,MATCH("C",A2:A6,0),MATCH("bb",B1:D1,0 ))


All times are GMT +1. The time now is 10:30 AM.

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