+ Reply to Thread
Results 1 to 9 of 9

vlookup over multiple conditions

  1. #1
    Registered User
    Join Date
    10-25-2010
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Thumbs up vlookup over multiple conditions

    Dear Friends,

    This is my first post in this forum but I have learnt sumproduct formula through this forum and I am very thankfull for all the seniors for their support.

    Now!

    I have 2 sheets 1st have list of employees with some dates (with multiple repeatition (Database) another have employees name only one time (Final Report)

    like

    Sheet1
    A B C

    Maluk Muhammad 1/09/2009 28/02/2010
    Barakat Al Azmi 1/07/2009 30/06/2010
    Tanveer Alam 1/11/2009 30/04/2010
    Barakat Al Azmi 1/07/2010 31/12/2010
    Maluk Muhammad 1/03/2010 31/08/2010


    Sheet2

    A

    Maluk Muhammad `=VLOOKUP(A1,Final!A7:C62,MAX(2),0)
    Barakat Al Azmi
    Tanveer Alam
    Barakat Al Azmi
    Maluk Muhammad

    actually I need highest date of any employee from sheet 1, but i am getting highest date of the column, means vlookup condition not working only max() working.

    need instant support & help

    thanks

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: vlookup over multiple conditions

    Post a sample file... it sounds very much as though you should be using a Pivot Table * [rather than using Arrays etc...]

    * Configure PT such that names field is a Row Label and Date Fields are Data Fields set to MAX [rather than SUM] - formatted as Dates ... see link in sig. for general Pivot intro.
    Last edited by DonkeyOte; 10-25-2010 at 03:57 AM. Reason: typos

  3. #3
    Registered User
    Join Date
    10-25-2010
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vlookup over multiple conditions

    Quote Originally Posted by DonkeyOte View Post
    Post a sample file...

    Please find the attached file
    Attached Files Attached Files
    Last edited by DonkeyOte; 10-25-2010 at 05:52 AM. Reason: quote reduced

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: vlookup over multiple conditions

    Quote Originally Posted by Khalique Ahmed
    I need highest date of any employee from sheet 1
    I am a little confused by your sample file in conjunction with the above.

    Your sample file results imply

    "To" should be the MIN date value in Sheet1 Column B for the name specified
    "From" date should be the date stored in the cell adjacent to that in which the MIN is located - rather than being the MAX of Column C for that name.

    eg

    Maluk Mumhammad returns 1/9/2009 and 28/2/2010 as opposed to 1/9/2009 and 31/08/2011

    Can you confirm ?

  5. #5
    Registered User
    Join Date
    10-25-2010
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vlookup over multiple conditions

    "To" should be the MAX date value in sheet1 column B for the name specified
    "From" should be the MAX date of Column C for the specified.
    for Maluk Muhammad my result is 01/09/2009 and 28/02/2010
    that is wrong it should be 01/09/2010 31/08/2011
    Last edited by DonkeyOte; 10-25-2010 at 05:53 AM. Reason: unnecessary quote removed

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: vlookup over multiple conditions

    In which case you should definitely be using a Pivot Table.

    The Pivot in the example is sourced from a Dynamic Named Range called _PTData which will expand/contract as you add data to Sheet1 - all you need do when you revise the data is Refresh the Pivot*
    *if nec. you can use VBA to automate this
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-25-2010
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vlookup over multiple conditions

    Thanks for your support, your solution is perfect but another problem is that i m not much familiar with pivot table chart then first I have to learn the pivot table chart then I will be able to complete my report.

    Thanks for your support.

    I have joined this forum yesterday but I am feeling that why I didnt joint this forum before, it is a really very helpful plateform.
    Last edited by DonkeyOte; 10-25-2010 at 06:25 AM. Reason: unnec. quote removed

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: vlookup over multiple conditions

    Regards introduction to Pivots - see the link in my signature to Jon Peltier's site.

    On an aside please do not quote prior posts in their entirety - they simply clutter up your thread and the board in general.

  9. #9
    Registered User
    Join Date
    10-25-2010
    Location
    Saudi Arabia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vlookup over multiple conditions

    now I have prepared the pivot table chart with the help of your links, thanks again

+ 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