Read Matrix via function

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hi,
I have a matrix as follow

Name/Grade Dan Ben Dave Laura
Math A A+ C A
English B A B A+

How can I have a VBA fuction that will read this matrix, for example

Name_Grade( Ben , English ) = "A"
Name_Grade( Dave , Math ) = "C"

Many thanks,
Dan
 
Dan,

A formula is much simpler

=INDEX(A1:E20, MATCH(F1,A1:A20,0), MATCH(G1,A1:E1,0))

Where F1 is the subject and G1 is the name to lookup

Mike
 
Great formula! Does it work on Pivot tables- when the lookup value is in a
different sheet ? Does it require Ctrl+Enter?
Thanks (sorry to interrupt)
 
Back
Top