+ Reply to Thread
Results 1 to 7 of 7

Thread: Lookup with 2 different criterias

  1. #1
    Registered User
    Join Date
    08-12-2010
    Location
    Brighton
    MS-Off Ver
    Excel 2003
    Posts
    21

    Lookup with 2 different criterias

    Hi

    I'm sure there is a very simple answer to my lookup problem but I can't seem to figure it out so hoping someone can help.

    I want to be able to do one lookup to search for a date which I can do but I need a second part of the formula to check that date to see if the cell is above zero.

    For example, in the spreadsheet attached I want to be able to search in the sheet template 1, Cell C1.

    I want to lookup the date in cell B2 in the sheet project 1 cells h to t. Then once it has found that date in the row i want to search that column to see if the cell is above 0.

    For January I want to be able to search the column H and in H5 be able to give me the value in cell A5.

    I guess what I'm looking for is to search the row (row 4) with the dates in and then search that column for a particular cell which will give me the name of that person (column A).

    I'm sure I could have explained it better but the spreadsheet is attached if someone can help me.
    Attached Files Attached Files
    Last edited by frostie77; 02-13-2012 at 09:17 AM.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Lookup with 2 different criterias

    No attachment yet...
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    08-12-2010
    Location
    Brighton
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Lookup with 2 different criterias

    Sorry there is now

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

    Re: Lookup with 2 different criterias

    Do you mean:

    =INDEX('Project 1'!$H$5:$T$21,ROWS($A$1:$A1),MATCH($B$2,'Project 1'!$H$4:$AR$4,0))

    copied down.

    If yes, you can also change the 'Project 1' so you can indirectly look at appropriate sheet, and use one formula copied down and across.

    e.g.

    =INDEX(INDIRECT("'"&C$2&"'!$H$5:$T$21"),ROWS($A$1:$A1),MATCH($B$2,INDIRECT("'"&C$2&"'!$H$4:$AR$4"),0 ))

    copied down and across.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    08-12-2010
    Location
    Brighton
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Lookup with 2 different criterias

    Sorry I probably didn't explain it very well. The answer will come from column A in the project 1 sheet.

    I need to search the date from the template sheet in cell B2 against rows H5 to T5 in project 1.

    Once I know the date I want it to search a particular cell in the project sheet to see if it is above zero. If it is then the answer will come from column a in the project sheet.

    For example if i was inputting the formula in the template sheet in cell C3 I would want to get my answer for january (column H)from cell A5

    If I was inputting the formula in the template sheet in cell C14 I would want to get my answer for March (Column J) from cell A16.

    I hope that makes things clearer.
    Last edited by frostie77; 02-13-2012 at 09:09 AM.

  6. #6
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Lookup with 2 different criterias

    Is this it?

    =IF(INDEX('Project 1'!$H$5:$T$21,ROWS($A$1:$A1),MATCH($B$2,'Project 1'!$H$4:$AR$4,0))>0,'Project 1'!$A5,"")
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  7. #7
    Registered User
    Join Date
    08-12-2010
    Location
    Brighton
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Lookup with 2 different criterias

    Yes it is now working how I want it. Thank you so much for your help

+ 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.2.0