Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Read Matrix via function

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Read Matrix via function

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

"Dan" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Read Matrix via function

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)

"Mike H" wrote:

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

"Dan" wrote:

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

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
Funtion as Matrix function? Dietmar M. Kehrmann Excel Programming 0 April 18th 08 09:06 PM
read Matrix Dan Excel Programming 4 February 8th 08 11:54 AM
Can I write a function like matrix function? Evaluate function parameter as VBA code[_2_] Excel Programming 2 July 23rd 07 02:16 PM
UDF function on Matrix Arrun Excel Programming 1 December 26th 06 10:51 AM
VBA function return matrix? Steve O'Hagan Excel Programming 3 January 29th 04 08:27 PM


All times are GMT +1. The time now is 02:21 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"