+ Reply to Thread
Results 1 to 6 of 6

Lookup type query with multiple criteria

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Lookup type query with multiple criteria

    Hi,

    We have a number of contracts with suppliers to provide services at agreed rates. What i'd like to do is check that when they submit their invoices the rate they've charged is either acceptable (i.e. less than the agreed rate) or matches the agreed rate. The criteria that i'd like to check against the rate are:

    • Contract Ref
    • Supplier Name
    • Grade of labour

    I hope this makes sense? Example attached.

    Thanks in advance,

    Snook
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Lookup type query with multiple criteria

    what is the answer for 1 row in acceptable column & in match column should come

    and how that came let us know so that i can try
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Lookup type query with multiple criteria

    In [Invoice Log]!G3, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down.


    In [Invoice Log]!I3, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

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

    Re: Lookup type query with multiple criteria

    hi Snook. but what do you want to show up at Column G & I? typing that out will help us figure out what you need more easily. this below will help you get the rates based on the 3 criteria.
    =SUMIFS(INDEX(Rate!$D$4:$H$23,,MATCH(D3,Rate!$D$3:$H$3,0)),Rate!$B$4:$B$23,B3,Rate!$C$4:$C$23,C3)

    so if you need to compare with Column E & simply return TRUE/FALSE, use:
    =SUMIFS(INDEX(Rate!$D$4:$H$23,,MATCH(D3,Rate!$D$3:$H$3,0)),Rate!$B$4:$B$23,B3,Rate!$C$4:$C$23,C3)<E3

    if you want a Y/N, then:
    =IF(SUMIFS(INDEX(Rate!$D$4:$H$23,,MATCH(D3,Rate!$D$3:$H$3,0)),Rate!$B$4:$B$23,B3,Rate!$C$4:$C$23,C3)<E3,"y","n")

    it's similar for Column I

    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

  5. #5
    Registered User
    Join Date
    05-18-2013
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Lookup type query with multiple criteria

    Based on my understanding I perform the attached file, Check it and let me know
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Lookup type query with multiple criteria

    look at the returned sample
    Attached Files Attached Files

+ 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. How to get multiple criteria in query?
    By jgomez in forum Access Tables & Databases
    Replies: 2
    Last Post: 09-06-2013, 01:57 PM
  2. [SOLVED] VBA - If statements - Multiple criteria (including Cell type)
    By oglion in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-02-2013, 08:43 PM
  3. [SOLVED] Multiple lookup query, AND/IF multiple sheets
    By Christopherdj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-29-2012, 09:01 PM
  4. Replies: 1
    Last Post: 05-16-2011, 05:00 PM
  5. Replies: 8
    Last Post: 08-06-2010, 07:27 AM

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