Lookup based on multiple column matches

mbailey5

New Member
Joined
Apr 8, 2015
Messages
5
Is there a formula that allows me to determine if a row in a given range or table exists with specified values in two different colums regardless of sort orders? I have a two ranges with data concerning payments. The first range records liabilities and the second range records payments made. Both ranges contain many columns, two of which are Due Date (the payment due date) and Amount (payment amount). Only full payments are allowed so the Amount columns in both ranges will always contain matching values. In the Liabilities range, I want to add a column that displays an "X" if the liability shows as paid in the Payments range. Multiple rows could contain the same Due Date but the Amount values will be unique for any given Due Date (i.e., there will never be multiple rows with the same Due Date and Amount). Multiple rows could contain the same Amount but the Due Dates would always be different. The rows in the Liabilities range will NOT be sorted by Due Date or by Amount. The rows in the Payments range are sorted by Due Date but there is no secondary sort on Amount. The formula VLOOKUP(ROUND(E4,2),$L$4:$M$60,2,FALSE)=F4 (where column E is the Liabilities Amount, F is the Liabilities Due Date, L is the Payment Amount, M is the Payment Due Date) looks up the Liabilities Amount in the Payments range, returns the Payment Due Date and returns True if that matches the Liabilties Due Date. However, this will fail for the second of two identical Amounts with different Due Dates because VLOOKUP will match the first Amount and return the first Due Date, which will not match the second Due Date.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Maybe LOOKUP helps!
In G4:
Code:
=SUBSTITUTE(IFERROR(LOOKUP(2,1/($L$4:$L$60=ROUND(E4,2))/($M$4:$M$60=F4)),""),1,"X")
 
Upvote 0
Solution
Maybe LOOKUP helps!
In G4:
Code:
=SUBSTITUTE(IFERROR(LOOKUP(2,1/($L$4:$L$60=ROUND(E4,2))/($M$4:$M$60=F4)),""),1,"X")[/cod
[/QUOTE]
Bebo - This works. I was not aware that Lookup handled array formulae natively so I had to research what your solution was doing. Thanks for educating me about what Lookup can do.
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top