Lookup Formula

criner5

New Member
Joined
Aug 26, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi, I'm trying to create a lookup formula that looks at several different criteria.

I'm trying to find if there are any formula so that I could in each cell O7-AA7 down the list have True or False appear if for any row the value in column J and column M appear that exist for one of the values in N2:N5 and the acct number listed in O6:AA6.

Any help would be much appreciated.
 

Attachments

  • Image.JPG
    Image.JPG
    149.1 KB · Views: 17

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Can you say something more about how the contents of column J factor into the criteria? I see what you mean about finding instances where O6:AA6 match any of the items in N2:N5, but where does column J enter into the criteria...or do you mean column C? Perhaps something like this...
MrExcel20210401.xlsx
CJMNOPQR
1
2520-14953
3520-14513
4520-16182
5520-12992
6Acct NoSec IDTrade DateSettlement Date520-15402520-16182520-15408520-14953
7520-14953FALSETRUEFALSETRUE
8123FALSEFALSEFALSEFALSE
9520-14513FALSETRUEFALSETRUE
10789FALSEFALSEFALSEFALSE
11520-12992FALSETRUEFALSETRUE
121011FALSEFALSEFALSEFALSE
13520-16182FALSETRUEFALSETRUE
Sheet4
Cell Formulas
RangeFormula
O7:R13O7=AND(ISNUMBER(MATCH(O$6,$N$2:$N$5,0)),ISNUMBER(MATCH($C7,$N$2:$N$5,0)))
 
Last edited:
Upvote 0
Can you say something more about how the contents of column J factor into the criteria? I see what you mean about finding instances where O6:AA6 match any of the items in N2:N5, but where does column J enter into the criteria...or do you mean column C? Perhaps something like this...
MrExcel20210401.xlsx
CJMNOPQR
1
2520-14953
3520-14513
4520-16182
5520-12992
6Acct NoSec IDTrade DateSettlement Date520-15402520-16182520-15408520-14953
7520-14953FALSETRUEFALSETRUE
8123FALSEFALSEFALSEFALSE
9520-14513FALSETRUEFALSETRUE
10789FALSEFALSEFALSEFALSE
11520-12992FALSETRUEFALSETRUE
121011FALSEFALSEFALSEFALSE
13520-16182FALSETRUEFALSETRUE
Sheet4
Cell Formulas
RangeFormula
O7:R13O7=AND(ISNUMBER(MATCH(O$6,$N$2:$N$5,0)),ISNUMBER(MATCH($C7,$N$2:$N$5,0)))
Thank you. I realize my wording was a little confusing.

We want to find out whether rows for account numbers were executed for the same Sec ID on the same day for the account numbers in row O.

So we wanted to create a formula to compare all rows (columns J and M) for the Account Nos. listed in N2:N5 against all rows with account no. in O6 and so on.

For now, we came up with a workaround of separating all the data by account no on separate sheets and then doing a countifs function for each one, but we really need this on one sheet.
 
Upvote 0
What about giving us the sample data again but also include the expected results with detailed explanation of a few of those results?
It would also help greatly if you did that with XL2BB so that helpers don't have to manually type out a huge amount of data to test with.
 
Upvote 0
Peter's suggestion is spot on. I'm still not following you, and a working example would be very helpful. I can only guess at the objective. In this example, columns C, J, and M are considered, and we determine where the same set of Acct No, Sec ID, and Trade Date are found on two or more rows AND the Acct No associated with that set is shown in $N$2:$N$5. Then for those rows, the value of TRUE is shown if the column heading in O$6:R$6 has an acct no that matches one listed in $N$2:$N$5...otherwise FALSE is shown.
MrExcel20210401.xlsx
CJMNOPQR
1
2520-14953
3520-15402
4520-16182
5520-16625
6Acct NoSec IDTrade DateSettlement Date520-15402520-16182520-16625520-14953
7520-16625TSLX12/31/2018FALSEFALSEFALSEFALSE
8520-1011893061027/1/2018FALSEFALSEFALSEFALSE
9520-16625PSEC12/31/2018FALSEFALSETRUEFALSE
10520-15402DIA10/1/2018TRUEFALSEFALSEFALSE
11520-1299293061027/1/2018FALSEFALSEFALSEFALSE
12520-15402DIA10/1/2018TRUEFALSEFALSEFALSE
13520-16625PSEC12/31/2018FALSEFALSETRUEFALSE
Sheet4
Cell Formulas
RangeFormula
O7:R13O7=AND(SUMPRODUCT(($C$7:$C$13=$C7)*($J$7:$J$13=$J7)*($M$7:$M$13=$M7))>=2,ISNUMBER(MATCH($C7,$N$2:$N$5,0)),$C7=O$6)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
O7:R13Cell Value=TRUEtextNO
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,561
Members
449,089
Latest member
Motoracer88

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