using wildcards for text in index/match multiple criteria in Excel

Tony Tony

New Member
Joined
Jun 10, 2014
Messages
3
I'm having trouble using wildcards for text in index/match multiple criteria; I need to find the nearest site along a river (x) below a certain point (distance =21), each stretch of the river is labelled with the streches downstream (so stretch abc is upstream of ab).
My problem arises when the nearest point downstream is on the downtsream stretch of river.
How do I use wild card to search for ab&"*" that will exclude abd.
Any help would be greatly appreciated.

Tony

[TABLE="width: 320"]
<tbody>[TR]
[TD="width: 64"]Site[/TD]
[TD="width: 64"]River[/TD]
[TD="width: 64"]Distance[/TD]
[TD="width: 64"]Stretch[/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD]S1[/TD]
[TD]x[/TD]
[TD="align: right"]10[/TD]
[TD]a[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S2[/TD]
[TD]x[/TD]
[TD="align: right"]15[/TD]
[TD]ab[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S3[/TD]
[TD]x[/TD]
[TD="align: right"]20[/TD]
[TD]ab[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S4[/TD]
[TD]x[/TD]
[TD="align: right"]22[/TD]
[TD]abd[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S5[/TD]
[TD]x[/TD]
[TD="align: right"]25[/TD]
[TD]abc[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S6[/TD]
[TD]x[/TD]
[TD="align: right"]30[/TD]
[TD]abc[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S7[/TD]
[TD]y[/TD]
[TD="align: right"]10[/TD]
[TD]a[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S8[/TD]
[TD]y[/TD]
[TD="align: right"]15[/TD]
[TD]ab[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S9[/TD]
[TD]y[/TD]
[TD="align: right"]20[/TD]
[TD]ab[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]S10[/TD]
[TD]y[/TD]
[TD="align: right"]22[/TD]
[TD]abd[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Riv[/TD]
[TD]Dist[/TD]
[TD]Stretch[/TD]
[TD]Expected[/TD]
[TD]Calculated[/TD]
[/TR]
[TR]
[TD]x[/TD]
[TD="align: right"]21[/TD]
[TD]abc[/TD]
[TD]S3[/TD]
[TD="align: center"]#N/A[/TD]
[/TR]
[TR]
[TD]x[/TD]
[TD="align: right"]27[/TD]
[TD]abc[/TD]
[TD]S5[/TD]
[TD]S5[/TD]
[/TR]
</tbody>[/TABLE]

'formula in cell E14 ={INDEX(A2:C11,MATCH(1,(A14=B2:B11)*(C2:C11<b14)*(c14=d2:d11),0),1)}< html=""></b14)*(c14=d2:d11),0),1)}<><B14)*(C14=D2:D11),0),1)}
tried: INDEX(A2:C11,MATCH(1,(A14=B2:B11)*(C2:C11<B14)*(IF(COUNTIF($D2:$D11,C14&"*")>0,1,0)),0),1)
 
Last edited:
<b14)*(c14=d2:d11),0),1)}
<b14)*(if(countif($d2:$d11,c14&"*")
</b14)*(if(countif($d2:$d11,c14&"*")
</b14)*(c14=d2:d11),0),1)}>'formula in cell E14 ={INDEX(A2:C11,MATCH(1,(A14=B2:B11)*(C2:C11<B14)*(C14=D2:D11),0),1)}
 
Last edited:
Upvote 0
<b14)*(c14=d2:d11),0),1)}< html="">
formula in cell E14 ={INDEX(A2:C11,MATCH(1,(A14=B2:B11)*(C2:C11 is less than B14)*(C14=D2:D11),0),1)}</b14)*(c14=d2:d11),0),1)}<>

'also tried something along these lines to no avail =INDEX(A2:C11,MATCH(1,(A14=B2:B11)*(C2:C11 is less than B14)*(IF(COUNTIF($D2:$D11,C14&"*")>0,1,0)),0),1)
 
Upvote 0

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