+ Reply to Thread
Results 1 to 9 of 9

Vlookup Multiple search criterias

  1. #1
    Registered User
    Join Date
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Vlookup Multiple search criterias

    Hi all,

    I have this formula that does the following:

    =IF($B$4="";"";VLOOKUP($B$4;Bookings!$B$10:$AD$942;4;0))


    B4 = "a date"
    Bookings!B10:AD942 = The matrix contains dates / names / etc.
    4 = Returns the row 4 which is a "name"


    How can i make this formula to search for a date (B4) and also include another search criteria like (E4) ( Doesnt matter if its a number or text )

    So Vlookup meeting 2 criterias and returning the values based on the IF (B4)


    Thanks
    Last edited by Rage; 05-24-2010 at 08:02 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: Vlookup Multiple search criterias

    I don't get it.

    Are you looking also to match the value of E4 in another column of the Bookings table?
    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
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Vlookup Multiple search criterias

    I have dates that are the same on the MATRIX TABLE.
    If i keep using the formula i posted, it will only retrive the value of the first matching date, thats why i need to had another search criteria, based on E4 value

    I hope i made some sense, if not i will post the xls once im able to.

    Cheers

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

    Re: Vlookup Multiple search criterias

    So are you saying that if doesn't find the B4 value in the first column of the table, then look for the E4 value in the first column of the lookup table?

    if not, then you'd better post a sample...

  5. #5
    Forum Contributor
    Join Date
    08-19-2009
    Location
    uk
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: Vlookup Multiple search criterias

    Not sure if this is what your after and its proabably not the prettiest but i sort of get round it by concatonating two columns together to create a unique lookup value. You could concatonate 3 or more if you needed in order to make it unique. Then do a vlookup of this unique lookup value. See the spreadsheet ive attached... hop this is what your after and helps

    Chemist
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Vlookup Multiple search criterias

    Quote Originally Posted by Chemistification View Post
    Not sure if this is what your after and its proabably not the prettiest but i sort of get round it by concatonating two columns together to create a unique lookup value. You could concatonate 3 or more if you needed in order to make it unique. Then do a vlookup of this unique lookup value. See the spreadsheet ive attached... hop this is what your after and helps

    Chemist

    Ok i tried to use that forumla

    =IF($L$5="";"";VLOOKUP($L$5;Bookings!$B$10:$AE$936;4;0))

    Were L5 = the concatenate value

    But i get N/A shown as result


    PS: I have both values concatenated in both sheets like your example.
    Do i need to have the concatenated value in the first column like your example ?

  7. #7
    Registered User
    Join Date
    10-22-2009
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Vlookup Multiple search criterias

    I managed to do it with another formula.

    =IF(ROWS($A$2:$A2)>$H$12;"";INDEX(Bookings!E:E;MATCH(ROWS($A$2:$A2);'Base Dados'!D:D;0)))


    Since i was using this formula to get a different criteria, i used this to get what i needed.

    Anyway thanks for all the help.

  8. #8
    Registered User
    Join Date
    10-06-2010
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Smile Re: Vlookup Multiple search criterias

    Dear All,

    Please help me.

    I have a kind of data (of about 1000 rows)...in which many employee has many duplicate values.
    So i want to do is to bring a column of unique employee and a columns of unique values correcspondence to that particular employee....

    Em....if Joy - 10
    Tom - 20
    Joy - 35
    Karl - 56
    Tom - 60
    Joy - 47
    Jim - 98

    I want data to be like this...

    if i enter "Jon" -data come next cell -10, next cell - 35, next cell - 47
    if i enter 'Tom" data comes "20" and "60"

    I hope you understand.
    Please help me from this..

    Thanks/Regards
    Neeraj

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

    Re: Vlookup Multiple search criterias

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

+ 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