Index Match with 3 criteria inc finding string within longer row

gb199

New Member
Joined
Feb 21, 2020
Messages
3
Hi all,

I've searched extensively for the answer to this and come up blank. Is what I'm trying possible?

I am trying to return a description of a particular journal entry. There may be more than one entry which have subtly different descriptions. I need to match the nominal, cost center & also match a keyword within the journal description. However the keyword will be part of a longer string that will include, for example, a date or misc text that is not relevant. I cannot figure out how to do this with Index Match. My formula looks something look this:

=INDEX(O:O,MATCH(1,(M:M=E1)*(K:K="xxxx")*(O:O,"*HELPMEPLEASEMREXCEL*"),0)

I've also tried variants of nested if statements within the small function, but again no joy :(

Hopefully that makes sense. Can it be done?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Apologies the title isn't very clear - I went to write the post itself without finishing the title and then forgot and just submitted it :oops:
 
Upvote 0
Maybe something like this.
Also, it's usually best not to reference whole columns. If your data won't go below say row 15000, then set your range to O2:O15000.

Book1
ABCDEJKLMNO
1Bill test1 checkwxy
2rrrrtyFind a test
3yuiuioBill check
4xxxwxyBill test1 check
5hjuqasHello
6xxxftrAnother test1
7jhujkiAnother test3
Sheet1
Cell Formulas
RangeFormula
A1A1=INDEX(O:O,MATCH(1,(M:M=E1)*(K:K="xxx")*(ISNUMBER(SEARCH("test1",O:O))),0))
 
Upvote 0
Thank you so much AhoyNC - that worked! What's more I was able to adapt it to return the nth instance of the text being found thanks to your ISNUMBER solution above. There may be a better way to do it, but I worked it as follows:

=INDEX($O:$O,SMALL(IF($K:$K="xxx",IF($M:$M=$E1,IF(ISNUMBER(SEARCH("test1",$O:$O)),ROW($O:$O)-ROW(INDEX($O:$O,1,1))+1))),2))

The two at the end will return the 2nd instance, so change it to whatever instance you need
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,752
Members
448,989
Latest member
mariah3

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