+ Reply to Thread
Results 1 to 10 of 10

Lookup/Match Formula

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    74

    Lookup/Match Formula

    I need a formula that looks up a certain value in a range and return a value in the corresponding row.

    In Sheet 2 A1 I have VAN, in Sheet 1 row B I have varies cites, VAN, TOR, MTL, SAS.

    The formula would need to look up any VAN Sheet 1 Row B and return the value in Row E.

    For example if in Sheet 2 B4 I have VAN, then I need to return E4 to Sheet 2.

    Now there are going to be many VAN's which is why a Vlookup wouldn't work, is there a way to return all the Column E cells that have a have VAN in Column B.

    So on Sheet 2 it would look similar to this

    VAN

    1VANCLG1
    1VANCLG2
    1VANCLG3
    1VANCLG4
    1VANEDM1
    1VANKEL1
    1VANMTL1
    1VANMTL1
    1VANSAS1
    1VANSAS2
    1VANTOR1
    1VANTOR2
    1VANWPG1

    So the formula would need to be in Sheet 2 Cells A2-A50
    Last edited by MROMAR; 10-09-2012 at 03:13 PM.

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Lookup/Match Formula

    Try this in Sheet2!A2, with CTRL+SHIFT+ENTER, not just ENTER

    =IFERROR(INDEX(Sheet1!E:E,SMALL(IF(Sheet1!C$2:C$100=A$1,ROW(Sheet1!C$2:C$100)),ROWS(A$2:A2))),"")

    Adjust the range. Then copy A2 & fill down.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Registered User
    Join Date
    06-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Lookup/Match Formula

    That didn't really work, all it did was return the first value in Sheet 1 column E.

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Lookup/Match Formula

    Did you confirm the formula with CTRL+SHIFT+ENTER?

  5. #5
    Registered User
    Join Date
    06-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Lookup/Match Formula

    What does tha do? I pressed CTRL+SHIFT+ENTER and nothing happened

  6. #6
    Registered User
    Join Date
    06-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Lookup/Match Formula

    So I've attached a file.

    Row B is the lookup value,and Row E is the return value that I need.

    So in Sheet 2 there should be 81 entries
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Lookup/Match Formula

    In Sheet1 'Origin' is on column B, formula was looking on column C, so change C$2:C$100 to B$2:B$100

    =IFERROR(INDEX(Sheet1!E:E,SMALL(IF(Sheet1!B$2:B$100=A$1,ROW(Sheet1!B$2:C$100)),ROWS(A$2:A2))),"")

    Also, adjust the length.

    Here is a link about Array Formulas.

    http://www.databison.com/index.php/e...ray-constants/

  8. #8
    Registered User
    Join Date
    06-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Lookup/Match Formula

    I've done the changed you suggested and this is the result I end up with

    Book2.xlsx

  9. #9
    Registered User
    Join Date
    06-13-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Lookup/Match Formula

    You know what, I finally understood what you meant by CTRL+SHIFT+ENTER, works perfectly, thanks so much!

  10. #10
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Lookup/Match Formula

    ...deleted...

+ 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