+ Reply to Thread
Results 1 to 3 of 3

Using VLOOKUP with a dynamically created array.

  1. #1
    Registered User
    Join Date
    03-31-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    14

    Using VLOOKUP with a dynamically created array.

    Hi folks I need some help...

    I need to do a VLOOKUP() on an array that I'm dynamically working out...

    A1 holds the name of the person I'm looking up
    A2 holds the row number of the first row in the target array (eg 80)
    The target array will be 25 rows by 10 columns in worksheet 'Yearly Results' starting at Column 'A' in the row defined in A2
    In this case the target array should be 'YearlyResults'!A80:J104

    I've tried both
    =VLOOKUP(A2,OFFSET(ADDRESS(A1,1,1,1,"Yearly Results"),0,0,25,10),5,FALSE)
    =VLOOKUP(A2,INDIRECT(OFFSET(ADDRESS(A1,1,1,1,"Yearly Results"),0,0,25,10)),5,FALSE)

    I'd very much appreciate it if anyone can suggest a correction to this...

    Thanks, Paddy.
    Last edited by PaddyDarby; 05-14-2010 at 04:43 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using VLOOKUP with a dynamically created array.

    Does this work:

    =VLOOKUP(A1,INDEX('Yearly Results'!A:A,A2):INDEX('Yearly Results'!J:J,A2+24),10,FALSE)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-31-2010
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Using VLOOKUP with a dynamically created array.

    Hi NBVC, excellent, I didn't realise Index could be used like this. I've only ever used it to retreive data from a cell.

    Thanks Paddy.

+ 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