How to find a value based on 2 criteria: one horizontal and one vertical BUT which is not always in the same column.

Status
Not open for further replies.

smetu

Board Regular
Joined
Jun 12, 2013
Messages
54
Office Version
  1. 365
Is there a way to find a formula in the green box based on the grey and yellow boxes.
The fact that the transaction ID's of Fund I and Fund II are not in the same columns prevents me to find a solution to this problem.....
It's been a head scratching for me for weeeeks!
 

Attachments

  • Screenshot 2023-03-21 201637.jpg
    Screenshot 2023-03-21 201637.jpg
    65 KB · Views: 13
ok... so try this:

Excel Formula:
=OFFSET(A3,(MATCH(TRUE,MMULT(IFERROR(FIND(C14,FILTER(A3:Q6,A3:Q3="transaction id n*")),0),{1;1;1;1})>0,0))-1,0)

you will need to add another "1;" to {1;1;1;1} for each time 'transaction id n*' is found in row 3

i'll post the mini sheet in a moment
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
find a value based on 2 criteria.xlsx
ABCDEFGHIJKLMNOPQ
1
2sunrisesunriseconsentconsent
3datesfund ivs bankrefilltransaction id n*fund iivs bankrefilltransaction id n*fund iiivs bankrefilltransaction id n*fund ivvs bankrefilltransaction id n*
49/28/202215000001500020cap call 1fundi116000001600020refill fromfundii116000001600020refill fromfundiii116000001600020refill fromfundiv1
510/4/2022-2500000-2500020cap call 2fundi2-3500000-3500020cap call 1fundii2-3500000-3500020cap call 1fundiii2-3500000-3500020cap call 1fundiv2
63/23/2023123987410985
7
8
9
10
11
12
13
14fundiii2dates10/4/2022v2
1510/4/2022v3
final
Cell Formulas
RangeFormula
E14E14=INDIRECT(ADDRESS(IFERROR(IF(MATCH(C14,4:4,0),4),5),1))
E15E15=OFFSET(A3,(MATCH(TRUE,MMULT(IFERROR(FIND(C14,FILTER(A3:Q6,A3:Q3="transaction id n*")),0),{1;1;1;1})>0,0))-1,0)
 
Upvote 0
find a value based on 2 criteria.xlsx
ABCDEFGHIJKLMNOPQ
1
2sunrisesunriseconsentconsent
3datesfund ivs bankrefilltransaction id n*fund iivs bankrefilltransaction id n*fund iiivs bankrefilltransaction id n*fund ivvs bankrefilltransaction id n*
49/28/202215000001500020cap call 1fundi116000001600020refill fromfundii116000001600020refill fromfundiii116000001600020refill fromfundiv1
510/4/2022-2500000-2500020cap call 2fundi2-3500000-3500020cap call 1fundii2-3500000-3500020cap call 1fundiii2-3500000-3500020cap call 1fundiv2
63/23/2023123987410985
7
8
9
10
11
12
13
14fundiii2dates10/4/2022v2
1510/4/2022v3
final
Cell Formulas
RangeFormula
E14E14=INDIRECT(ADDRESS(IFERROR(IF(MATCH(C14,4:4,0),4),5),1))
E15E15=OFFSET(A3,(MATCH(TRUE,MMULT(IFERROR(FIND(C14,FILTER(A3:Q6,A3:Q3="transaction id n*")),0),{1;1;1;1})>0,0))-1,0)
btw, ignore the part in green, it's the part in yellow
 
Upvote 0
Thank you very much, we are almost there!
The only thing is that instead of selecting A3, can you select D14? Because the col of the dates may change with time so the dates won't always be in col A.
I do hope you find a way! 😅🙏🙏🙏
 
Upvote 0
the formula is not using the cell value "dates" in d14 for anything.
the a3 in the formula is tell it where to move from to get the final value. i've edited this to now look for the value "dates" in row 3.
will your data always be starting in row 3 as in your example? if not then you'd need to make some adjustments to the formula
if it will be then you should be able to use this.
i also threw in a way to find the amount based on the fund searching for
find a value based on 2 criteria.xlsx
ABCDEFGHIJKLMNOPQ
1
2sunrisesunriseconsentconsent
3datesfund ivs bankrefilltransaction id n*fund iivs bankrefilltransaction id n*fund iiivs bankrefilltransaction id n*fund ivvs bankrefilltransaction id n*
49/28/20221,500,0001,500,020cap call 1fundi11,600,0001,600,020refill fromfundii11,600,0001,600,020refill fromfundiii11,600,0001,600,020refill fromfundiv1
510/4/2022-2,500,000-2,500,020cap call 2fundi2-3,500,000-3,500,020cap call 1fundii2-3,500,000-3,500,020cap call 1fundiii2-3,500,000-3,500,020cap call 1fundiv2
63/23/2023test0fundi3test1fundii3test2fundiii3test3985
7
8
9
10
11
12
13
14fundii2date10/4/2022
15amount-3,500,000.00
final
Cell Formulas
RangeFormula
E14E14=OFFSET(INDIRECT(ADDRESS(3,MATCH("dates",3:3,0))),(MATCH(TRUE,MMULT(IFERROR(FIND(C14,FILTER(A3:Q6,A3:Q3="transaction id n*")),0),{1;1;1;1})>0,0))-1,0)
E15E15=OFFSET(INDIRECT(ADDRESS(3,MATCH((CONCAT(LEFT(C14,4)," ",MID(C14,5,LEN(C14)-5))),3:3,0))),(MATCH(TRUE,MMULT(IFERROR(FIND(C14,FILTER(A3:Q6,A3:Q3="transaction id n*")),0),{1;1;1;1})>0,0))-1,0)
 
Last edited:
Upvote 0
I need please that the formula includes D14 ("Dates"), so it will return the corresponding date of the transaction ID, in a way that if I modify and write "refill" in D14, it will return then "cap call 1" automatically.
And then my goal will be achieved! Is it possible to do that, you think? Please say yes. 😅 🙏
 
Upvote 0
PS: I have counted and I have 52 funds, so 52 columns of transaction ID's as well.
 
Upvote 0
the values in the formula: A3:Q6 & A3:Q3 till need to be extended to fit your actual data
but the formula
Excel Formula:
=OFFSET(INDIRECT(ADDRESS(3,MATCH(D14,3:3,0))),(MATCH(TRUE,MMULT(IFERROR(FIND(C14,FILTER(A3:Q6,A3:Q3="transaction id n*")),0),{1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1})>0,0))-1,0)
should give you the results you are looking for
 
Upvote 0
Last question: Is it possible to find a way without entering the 52 "1"?
Because I will add some new funds along the months.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,217,388
Messages
6,136,299
Members
450,002
Latest member
bybynhoc

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