+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP multiple criteria

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    16

    VLOOKUP multiple criteria

    Good day

    I need to import a value (text) with VLOOKUP. But it must only import it if the two values are the same.

    This is the formual i used:

    =IF(AND(VLOOKUP($A13, '[Trend lookup Sep.xls]VB SCRIPT'!A$2:A$141,1,0),(VLOOKUP($D13, '[Trend lookup Sep.xls]VB SCRIPT'!B$2:B$141,1,0))),VLOOKUP($A13, '[Trend lookup Sep.xls]VB SCRIPT'!A$2:C$141,3,0))

    It looks at the right values but only returns a #value! in the correct cells.

    I have attached the 2 files im using for more information.

    Please help?

    Kind regards
    Heinrich
    Attached Files Attached Files
    Last edited by Heinrich Venter; 09-11-2012 at 09:43 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: VLOOKUP multiple criteria

    if you are looking for where 2 values match in 2 different columns on the same row and want to return from a third
    index('[Trend lookup Sep.xls]VB SCRIPT'!c$2:C$141,match(a13&d13,index('[Trend lookup Sep.xls]VB SCRIPT'!A$2:A$141& '[Trend lookup Sep.xls]VB SCRIPT'!B$2:B$141,0),0)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-20-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: VLOOKUP multiple criteria

    Hi martindwilson

    Thank you it worked )

    Have a nice day.

    Kind regards
    Heinrich

  4. #4
    Registered User
    Join Date
    08-03-2005
    Location
    Harpers Ferry, WV
    Posts
    26

    Re: VLOOKUP multiple criteria

    Hard to see anything wrong without a sample. According to documentation the only time VLookup should return a #value error is when the index is < 1.
    Old Programmers Never Die ... They Just Lose Their Bits

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: VLOOKUP multiple criteria

    =AND(VLOOKUP(B1,$D$1:$D$9,1,0),VLOOKUP(B2,$E$1:$E$9,1,0)) if both results are text or one text the other a number =#value, if either is 0 then false if results are both numbers greater than 0 result is true,

  6. #6
    Registered User
    Join Date
    09-11-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: VLOOKUP multiple criteria

    guys it is taking toomuch of time in giving results could you please help me

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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