+ Reply to Thread
Results 1 to 3 of 3

Return value if two criteria match

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    13

    Return value if two criteria match

    At the moment I have a sheet of items that I have sold (sold sheet) and then another sheet which shows which items have currently been paid (paid sheet), What I would like is to insert a column into the Sold sheet called "PAID" which would automatically lookup in the paid sheet to see if that item has yet been paid for, and if the full amount has been paid then it would return "YES" and if not the full amount has been paid then it would show the minus value of what is missing e.g. "£-5" in the case of ID 102 in the example below.

    Sold Sheet

    ID PRICE PAID
    100 99
    101 150
    102 175

    Paid Sheet

    ID PRICE
    100 99
    101 150
    102 170

    In my spreadsheet the ID column is column 'i' and PRICE is column 'K', and I would like the PAID result to show in column 'R'. any help would be greatly appreciated. Thanks

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Return value if two criteria match

    hello
    change the references as needed.

    indexmatch.xlsx

    =IF(INDEX(Sheet2!$B$2:$B$4,MATCH(A4,Sheet2!$A$2:$A$4,0))=B4,"yes",INDEX(Sheet2!$B$2:$B$4,MATCH(A4,Sheet2!$A$2:$A$4,0))-B4)

    misplaced -B4
    Last edited by vlady; 08-09-2012 at 08:03 AM.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

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

    Re: Return value if two criteria match

    Something like:

    =IF(SUMIF(PAID!I:I,A2,PAID!K:K)-B2,SUMIF(PAID!I:I,A2,PAID!K:K)-B2,"Yes")

    adjust sheetname and references as necessary (A2 contains first ID in Sold Sheet, and B2 contains Price sold at)
    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.

+ 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