+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Some sort of lookup on a cell into an array of data???

  1. #1
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Some sort of lookup on a cell into an array of data???

    Hi

    See attached example - lookup using input cell into array.xlsx

    Basically need to enter a month and then a formula return the figures from the appropriate column in the data sheet

    Thanks

    SEE POST #5 for solution
    Last edited by benoj2005; 05-16-2012 at 11:18 AM.

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

    Re: Some sort of lookup on a cell into an array of data???

    If the AccNumber sequence is the same.. then:

    =INDEX(Data!$B$2:$M$5,ROWS($A$1:$A1),MATCH($C$2,Data!$B$1:$M$1))

    else

    =INDEX(Data!$B$2:$M$5,ROWS($A$1:$A2),MATCH($C$2,Data!$B$1:$M$1))

    copied down
    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
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Re: Some sort of lookup on a cell into an array of data???

    Quote Originally Posted by NBVC View Post
    If the AccNumber sequence is the same.. then:

    =INDEX(Data!$B$2:$M$5,ROWS($A$1:$A1),MATCH($C$2,Data!$B$1:$M$1))

    else

    =INDEX(Data!$B$2:$M$5,ROWS($A$1:$A2),MATCH($C$2,Data!$B$1:$M$1))

    copied down
    Sequence can be in any order. I have copied your second formula and it dosent work??

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

    Re: Some sort of lookup on a cell into an array of data???

    Here it is...

  5. #5
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Re: Some sort of lookup on a cell into an array of data???

    Quote Originally Posted by NBVC View Post
    Here it is...
    No that still dosent work, if I change any of the Acc Numbers in "Return" sheet then the figure does not change accordingly

    I have found the solution, see here - lookup using input cell into array.xlsx (If you change any of the account numbers in mine the figure changes accordingly

    Thanks for showing me the match function

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

    Re: Some sort of lookup on a cell into an array of data???

    I am sorry, I pasted the same formula twice in Post # 2 and in the attachment I had the correct formula in C5, but didn't copy it down.

    The formula in C5 is:

    =INDEX(Data!$B$2:$M$5,MATCH(B5,Data!$A$2:$A$5,0),MATCH($C$2,Data!$B$1:$M$1))

    and copied down to give same results as your VLOOKUP.

    ... that was careless of me... I apologize.

  7. #7
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Re: Some sort of lookup on a cell into an array of data???

    Quote Originally Posted by NBVC View Post
    I am sorry, I pasted the same formula twice in Post # 2 and in the attachment I had the correct formula in C5, but didn't copy it down.

    The formula in C5 is:

    =INDEX(Data!$B$2:$M$5,MATCH(B5,Data!$A$2:$A$5,0),MATCH($C$2,Data!$B$1:$M$1))

    and copied down to give same results as your VLOOKUP.

    ... that was careless of me... I apologize.
    Ahh I see, I think mines a little less complicated, maybe because i'm used to vlookups.

    You opened my eyes to the match function so thanks anyway

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

    Re: Some sort of lookup on a cell into an array of data???

    Where there is a will there are many ways

+ 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