Wildcards & Text in Index(Match ???????

spydey

Active Member
Joined
Sep 19, 2017
Messages
314
Office Version
  1. 2013
Platform
  1. Windows
Trying to use index(match to bring over some data from one sheet to another one.

Part of the criteria is based upon text found in a string. I was hoping to just use wild cards but it appears, after trying a few times, that it isn't working.

Where am I going wrong?

On sheet1 in cell D2 I am inputting the following:

=INDEX(SHEET2NAMEDRANGE1,MATCH(1,(SHEET2NAMEDRANGE2=A2)*(SHEET2NAMEDRANGE3="*ABC*")*(SHEET2NAMEDRANGE4="*XYZ*"),0),1)


SHEET2NAMEDRANGE1 is on sheet2 and is a single column, column F, it is a date.

SHEET2NAMEDRANGE2 is on sheet2 and is a single column, column A, it is numeric.

SHEET2NAMEDRANGE3 is on sheet2 and is a single column, column G, it is a text string.

SHEET2NAMEDRANGE4 is on sheet2 and is a single column, column D, it is a text string.

I get #N/A when I run confirm it with CSE.

Any thoughts?

-Spydey

P.S. Hmmm, just thinking through this, I wonder if I need to use something like .... (SHEET2NAMEDRANGE3=ISNUMBER(SEARCH("*ABC*",SHEET2NAMEDRANGE3))) ...... but something tells me that isn't right because I would be using a named range in my SEARCH( range ..... I think ..... :confused::eeek:
 
Last edited:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
You can't use a wildcard search like that I don't think. You could probably re-write it as:

=INDEX(SHEET2NAMEDRANGE1,MATCH(1,(SHEET2NAMEDRANGE2=A2)*(ISNUMBER(FIND("ABC",SHEET2NAMEDRANGE3)))*(ISNUMBER(FIND("XYZ",SHEET2NAMEDRANGE4))),0))

WBD
 
Upvote 0
You can't use a wildcard search like that I don't think. You could probably re-write it as:

=INDEX(SHEET2NAMEDRANGE1,MATCH(1,(SHEET2NAMEDRANGE2=A2)*(ISNUMBER(FIND("ABC",SHEET2NAMEDRANGE3)))*(ISNUMBER(FIND("XYZ",SHEET2NAMEDRANGE4))),0))

WBD

Sweet! Thanks WBD. I will give that a try.

-Spydey
 
Upvote 0
WBD,

Thanks for the push in the right direction. I changed it a smidge and it is working now. Thanks man!

My formula is as follows:

=INDEX(SHEET2NAMEDRANGE1,MATCH(1,(SHEET2NAMEDRANGE2=A2)*(ISNUMBER(SEARCH("*ABC*",SHEET2NAMEDRANGE3)))*(ISNUMBER(SEARCH("*XYZ*",SHEET2NAMEDRANGE4))),0))

It actually froze for like 30 - 45 seconds as it performed the calculations on approx 1k cells that I filled it down on. But it came back correctly!!

Thanks again!!

-Spydey
 
Upvote 0

Forum statistics

Threads
1,223,968
Messages
6,175,677
Members
452,666
Latest member
AllexDee

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