INDEX/MATCH with Wildcard

beckys

Board Regular
Joined
Apr 19, 2005
Messages
116
Hello,
I am using the following formula:
INDEX('LP AX Flat File'!$A$7:$AZ$25, MATCH($A7, 'LP AX Flat File'!$A$7:$A$25, 0), MATCH(AJ$6, 'LP AX Flat File'!$A$6:$AZ$6,0))


I would like to tweak it so that it matches the left 10 characters of AJ$6 to that word in any position in 'LP AX Flat File'!$A$6:$AZ$6.
(Essentially "*"&'LP AX Flat File'!$A$6:$AZ$6&"*"...but that method doesn't work.)

Any suggestions?

Thanks for your help!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hello,
I am using the following formula:
INDEX('LP AX Flat File'!$A$7:$AZ$25, MATCH($A7, 'LP AX Flat File'!$A$7:$A$25, 0), MATCH(AJ$6, 'LP AX Flat File'!$A$6:$AZ$6,0))


I would like to tweak it so that it matches the left 10 characters of AJ$6 to that word in any position in 'LP AX Flat File'!$A$6:$AZ$6.
(Essentially "*"&'LP AX Flat File'!$A$6:$AZ$6&"*"...but that method doesn't work.)

Any suggestions?

Thanks for your help!
Not sure. Maybe this...

=INDEX('LP AX Flat File'!$A$7:$AZ$25,MATCH($A7,'LP AX Flat File'!$A$7:$A$25,0),MATCH(LEFT(AJ$6,10),'LP AX Flat File'!$A$6:$AZ$6,0))
 
Upvote 0
The issue with this formula is that the data in 'LP AX Flat File'!$A$6:$AZ$6 would contain words other than LEFT(AJ$6,10). For example, LEFT(AJ$6,10) is the word 'unrealized'. In 'LP AX Flat File'!$A$6:$AZ$6, I would like the total of the following categories...
G/L - Section 988 UnRealized Gain/Loss
Section 1256 contracts UnRealized Gain/Loss
G/L - non New Issue UnRealized Gain/Loss

Thanks!
 
Upvote 0
The issue with this formula is that the data in 'LP AX Flat File'!$A$6:$AZ$6 would contain words other than LEFT(AJ$6,10). For example, LEFT(AJ$6,10) is the word 'unrealized'. In 'LP AX Flat File'!$A$6:$AZ$6, I would like the total of the following categories...
G/L - Section 988 UnRealized Gain/Loss
Section 1256 contracts UnRealized Gain/Loss
G/L - non New Issue UnRealized Gain/Loss

Thanks!
Any way you can direct us to a sample file?
 
Upvote 0
I actually figured it out...
SUMPRODUCT(('LP AX Flat File'!$A$7:$A$25=$A7)*(ISNUMBER(SEARCH(LEFT(AJ$6,10),'LP AX Flat File'!$F$6:$AZ$6)))*('LP AX Flat File'!$F$7:$AZ$25))

Thanks!
 
Upvote 0
I actually figured it out...
SUMPRODUCT(('LP AX Flat File'!$A$7:$A$25=$A7)*(ISNUMBER(SEARCH(LEFT(AJ$6,10),'LP AX Flat File'!$F$6:$AZ$6)))*('LP AX Flat File'!$F$7:$AZ$25))

Thanks!
Good deal. Thanks for the feedback! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,728
Members
452,939
Latest member
WCrawford

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