+ Reply to Thread
Results 1 to 6 of 6

Find neareast value with multiple criteria

  1. #1
    Registered User
    Join Date
    09-15-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Wink Find neareast value with multiple criteria

    Good Day,

    I am working with a workbook trying to marry payment amounts with invoices from two separate spreadsheets. Criteria for the current look up is the customer, invoice amount, and document type (invoice vs credit). The issue I am having is marrying invoices with payments that me be off a couple of cents (+/-) due to rounding. Below is what I'm currently working with, but I am at a lost beyond this. Thank you.

    INDEX(altref,MATCH(1,(rtype="Invoice")*(amount=$K143)*(customer=$C143),0))

    altref = invoice value I want retruned
    rtype = document is invoice vs credit

    Example

    Spreadsheet 1 Customer 1 invoice 21-12345-01 amount 12.33

    Spreadsheet 2 Customer 1 payment 12.34 Invoice N/A with above formula
    Should still return value 21-12345-01

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,655

    Re: Find neareast value with multiple criteria

    It is so hard to find solution unless you post a suporrting file!
    Anyway, try to replace MATCH(1,...) with MATCH(2,...)
    If it does not work, post a dummy file,
    Regards,
    Quang PT

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Find neareast value with multiple criteria

    Hi mrsogmax76,

    12.33 changed to 12.34 on sheet 2.. creates confusion.

    As suggested by bebo, upload a sample file. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>


    mrsogmax76 is offline
    Registered User
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  4. #4
    Registered User
    Join Date
    09-15-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Find neareast value with multiple criteria

    Please see attached dummy file. Any assistance you can provide is deeply appreciated.
    Attached Files Attached Files

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,655

    Re: Find neareast value with multiple criteria

    Quote Originally Posted by mrsogmax76 View Post
    Please see attached dummy file. Any assistance you can provide is deeply appreciated.
    How would you like to round?
    Assuming round to 1 decimal. Ex: 15,583.31 -> 15,583.39 = 15,583.40
    Amount should be rounded up: = ROUNDUP(amount,1)
    Anyway, 1st line of amount range contains text (column title), so re-define range of the ALL name to start from row(2) (altref, customer, invoice,...) OR use ROUNDUP(IF(ISNUMBER(amount),amount,0),1) without re-define name.
    The formula to get invoice ref should be as follow:
    Please Login or Register  to view this content.
    Hope this works.

  6. #6
    Registered User
    Join Date
    09-15-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Find neareast value with multiple criteria

    That worked like a charm. Even better, it's simple and I actually understand what it's doing. Only issue is that it's nested in another formula so now there are to many conditions, and I get an error. Is it possible to condense this, so that it will work if works for nearest value (+/-) and exact matches. Thank you.

+ 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