+ Reply to Thread
Results 1 to 3 of 3

non-array formula with multiple lookups

  1. #1
    Registered User
    Join Date
    03-14-2007
    Posts
    58

    non-array formula with multiple lookups

    OK .. so I have this formula and it works flawlessly. Except for the fact that it is an array and it's apart of my macro and I have to manually make it an array for it to work. I have over 40 pages that I would have to manually go do so that's not gonna work for me. I know there's away to get it to do it with like a vlookup maybe but I cannot get it to work. So here's what my formula is:

    =INDEX(Updated!$E$2:$E$667,MATCH($A$1,IF(Updated!$B$2:$B$667=B2,Updated!$A$2:$A$667,),0))

    Basically I have multiple students who take multiple tests. I want to find the score for a particular test based on the students name.

    A1 contains the students name
    B2 contains the course list
    Updated!B2:b667 has all the courses
    Updated!A2:A667 has all the students names
    Updated!E2:E667 has all the scores

    Any help would be appreciated.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You should be able to define the formula as an array within the macro but for a non-array version try

    =LOOKUP(2,1/((Updated!$B$2:$B$667=B2)*(Updated!$A$2:$A$667 =$A$1)),Updated!$E$2:$E$667)

    or, assuming each course/student combination will only appear once at most

    =SUMPRODUCT((Updated!$B$2:$B$667=B2)*( Updated!$A$2:$A$667=$A$1)*Updated!$E$2:$E$667)
    Last edited by daddylonglegs; 03-14-2007 at 09:56 AM.

  3. #3
    Registered User
    Join Date
    03-14-2007
    Posts
    58
    how do you define the array within the macro? I have to manually go into the cell and hit ctrl+shift+enter? and I tried that formula but no luck so far.

    =LOOKUP(2,1/((Updated!$ B$2:$B$667=B2)*(Updated!$A$2:$A$667=$A$1) ),Updated!$E$2:$E$667)


    What is the 2, 1/ for?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1