+ Reply to Thread
Results 1 to 11 of 11

lookup formula need (2 look up and one criteria)

  1. #1
    Forum Contributor ryan4646's Avatar
    Join Date
    06-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2003, 2007
    Posts
    134

    lookup formula need (2 look up and one criteria)

    Hi all,

    i need one urgent solution for the below matter.

    In sheet one, i need to fill up unit information (column k) , from second sheet column "I" exactly
    matching with "A" and "E" column. In sheet one unit (column "k") A and E column has to match with the same information at second sheet.

    i am helped by this forum many times, hope this time also i will get on solution asap. cheers.
    Attached Files Attached Files
    Last edited by ryan4646; 12-24-2013 at 03:11 AM.
    thanks,

    Ryan

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: lookup formula need (2 look up and one criteria)

    hi ryan. what happens when there is a duplicate value? this array formula would pick the first one:
    =INDEX(GR!$I$2:$I$1083,MATCH(A2&E2,GR!$A$2:$A$1083&GR!$B$2:$B$1083,0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    this would take the average & is much faster:
    =AVERAGEIFS(GR!I:I,GR!A:A,A2,GR!B:B,E2)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor ryan4646's Avatar
    Join Date
    06-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2003, 2007
    Posts
    134

    Re: lookup formula need (2 look up and one criteria)

    HI BEISHIRYO

    actually i cannot take the first one because by order to order and by month the unit price gets change. so i have to take the unit price "k" based on data in the second sheet exactly matching with my second sheet (column A and B)

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: lookup formula need (2 look up and one criteria)

    Try this:
    =INDEX(GR!$I$2:$I$1083,MATCH(MASTER!A2&MASTER!E2&MASTER!J2,GR!$A$2:$A$1083&GR!$B$2:$B$1083&TEXT(GR!$F$2:$F$1083,"MMM"),0))
    Confirm Control+Shift+Enter
    This will talke into account month in column J
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: lookup formula need (2 look up and one criteria)

    May be slight addition in Beni’s formula

    In K2 Cell - Array Formula - Requires CTRL+SHIFT+ENTER

    =IFERROR(INDEX(GR!$I$2:$I$1083,MATCH(A2&E2&TRIM(J2),GR!$A$2:$A$1083&GR!$B$2:$B$1083&TEXT(GR!$F$2:$F$1083,"MMM"),0)),"-")

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

    Drag it down…

    Wait until the calculation gets completed


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  6. #6
    Forum Contributor ryan4646's Avatar
    Join Date
    06-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2003, 2007
    Posts
    134

    Re: lookup formula need (2 look up and one criteria)

    Hi sixth sense,

    here is the attached file after pasting formula as it is now showing any data. actually you can segregate J column from the formula.there is nothing with it. Just need exact matching K column of first sheet from second sheet "I" column and the look ups are "A" and "E" from first sheet.

    real sorry for confusing if i made any
    Attached Files Attached Files

  7. #7
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: lookup formula need (2 look up and one criteria)

    IFERROR does not wotk in Excel 03(your file is saved as xls)
    Use this
    =IF(ISERROR(INDEX(GR!$I$2:$I$1083,MATCH(A2&E2&TRIM(J2),GR!$A$2:$A$1083&GR!$B$2:$B$1083&TEXT(GR!$F$2:$F$1083,"MMM"),0))),"-",INDEX(GR!$I$2:$I$1083,MATCH(A2&E2&TRIM(J2),GR!$A$2:$A$1083&GR!$B$2:$B$1083&TEXT(GR!$F$2:$F$1083,"MMM"),0)))
    or switch to 07 version

  8. #8
    Forum Contributor ryan4646's Avatar
    Join Date
    06-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2003, 2007
    Posts
    134

    Re: lookup formula need (2 look up and one criteria)

    hi Mika,


    I hope some of cells didnt take the duplicate value. Actually not duplicate, those are the same items that bought in month after month.

    attaching file of formula outcome as it is showing lot of "-" sign.

    very sorry for the inconvenience.
    Attached Files Attached Files

  9. #9
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: lookup formula need (2 look up and one criteria)

    COATS TOTAL BUY 2013.xls
    You are having issues with the date format (UK/US) where months is as a first in the date.
    I have added formula in column N sheet GR.
    Please see attached

  10. #10
    Forum Contributor ryan4646's Avatar
    Join Date
    06-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2003, 2007
    Posts
    134

    Re: lookup formula need (2 look up and one criteria)

    Hi robertmika,

    very sorry for the inconvenience. dont know why the formula is showing some numbers, where it should show unit price only. And actually i want it on the first sheet "k" column.
    attaching screen shots.
    Attached Images Attached Images

  11. #11
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: lookup formula need (2 look up and one criteria)

    The formula on the screenshot is showing the date in correct format.
    The formula in sheet Master column L should read
    =MATCH(A2&E2&TRIM(J2),GR!$A$2:$A$1083&GR!$B$2:$B$1083&TEXT(GR!$N$2:$N$1083,"MMM"),0)
    and is just showing matching rows in sheet GR.
    COATS TOTAL BUY 2013.xls
    Hope that helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. lookup formula that evaluates two criteria
    By waternut in forum Excel General
    Replies: 3
    Last Post: 09-02-2011, 08:57 AM
  2. Replies: 1
    Last Post: 05-16-2011, 05:00 PM
  3. Lookup formula - multiple criteria
    By realmfighter in forum Excel General
    Replies: 6
    Last Post: 09-13-2009, 10:02 AM
  4. Lookup formula - 2 criteria in rows
    By laurafv in forum Excel General
    Replies: 6
    Last Post: 01-31-2009, 05:11 PM

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