+ Reply to Thread
Results 1 to 11 of 11

Look into an array and return the same row in another column

Hybrid View

  1. #1
    Registered User
    Join Date
    07-24-2007
    Posts
    9

    Look into an array and return the same row in another column

    Hi all,

    I have an array with a lot of rows and columns filled with different codes.

    I need to look into this array for one specific number and return the value in the same row in an specific column.

    I can't use Vlookup in this case because it needs to have the values you are looking for in the first column and my values are spread in different columns.

    Thanks in advance.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can use Index/Match as an alternative to Vlookup that will look left or right of the lookup column.

    e.g. =Index(A:A,Match(X1,C:C,0))

    where X1 is the value to find in column C and return the corresponding data from column A
    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
    07-24-2007
    Posts
    9
    Thanks for the reply NBVC.

    But the problem I have is I have to look for in an array, not in a column and Vlookup or the formula you provided me with don't work. To use these formulas you have to have the values in one column and I have them spread in an array.

    Thanks anyway, I've learnt another way to do it.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by cmt_london
    Thanks for the reply NBVC.

    But the problem I have is I have to look for in an array, not in a column and Vlookup or the formula you provided me with don't work. To use these formulas you have to have the values in one column and I have them spread in an array.

    Thanks anyway, I've learnt another way to do it.


    Perhaps its best if posted an example (a zipped XL 2003 or earlier file) showing what exactly your are trying to do and what results you expect..

  5. #5
    Registered User
    Join Date
    07-24-2007
    Posts
    9
    Find attached the example file.

    There is an array A1:D4 with all the numbers and codes.

    And there is a list of numbers A8:A16.

    I need a formula in B8 that look for the number 810844 in the array A1:D4 and return the value in the column D of the same row, in this case AAA.

    And the same for the cells B9 to B16.

    Do you understand where I get stuck? Your formula or the Vlookup one will work if all numbers will be in the same column, but not if they are in different columns.

    Thanks,

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

    make sure it is zipped and that you click Upload after you select the file to attach.

+ 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