index match wildcard multiple search across a table

shakethingsup

Board Regular
Joined
May 21, 2017
Messages
64
Office Version
  1. 365
Platform
  1. Windows
Hello - I've been searching the boards and the web. I can't seem to get the logic and put things together. I can't find the thread or a web page. Perhaps I'm searching the wrong terminology.

I want to have partial/wildcard search capabilities. I know I'm making this more complicated than I need to.

The formula I'm using is probably too long as eventually I will need to search across a table with 20 columns. Also, for the most part, I think there won't be any similarities between columns. For example, I don't think there will be a chance that column B will have a value of Hello and column C will have a value of Helium. I mean if I can build this into the formula that would be great.

When I checked the output of each function, everything seemed okay:

=INDEX(A2:A6,MATCH(F1,(IFERROR(MATCH(F1&"*",B2:B6,0),0)+IFERROR(MATCH(F1&"*",C2:C6,0),0)),0))
=INDEX({"audit";"t3010";"sri";"due";"telephone"},Match(He,5,0))
Reblsic.jpg




WaYhTMj
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try this

=INDEX(A2:A6,MAX(IF(ISNUMBER(SEARCH(F1,B2:C6)),ROW(A2:A6)-ROW(A2)+1)))
Array formula, use Ctrl-Shift-Enter

This will search for F1 across columns B1 and C1 and using the relevant row will get the value from column A
You should be able to search multiple columns with this formula.

NOTE: If the search value does not exist it will return the value at A2
If the search data is repeatd you'll only get the last row, e.g. you search for e, but its in "due" and "telephone" youll only get telephone as a result.
Basically make sure your search data is not repeated.
 
Last edited:
Upvote 0
Try this

=INDEX(A2:A6,MAX(IF(ISNUMBER(SEARCH(F1,B2:C6)),ROW(A2:A6)-ROW(A2)+1)))
Array formula, use Ctrl-Shift-Enter

This will search for F1 across columns B1 and C1 and using the relevant row will get the value from column A
You should be able to search multiple columns with this formula.

NOTE: If the search value does not exist it will return the value at A2
If the search data is repeatd you'll only get the last row, e.g. you search for e, but its in "due" and "telephone" youll only get telephone as a result.
Basically make sure your search data is not repeated.


This seems like it worked. I'm going to try and understand more of the logic and break it down.

thank you!
 
Last edited:
Upvote 0
I wish I could help, it's not my formula, I just modified the search part of it to a partial search

Its part of something described as a "reverse two way lookup".
This is where youre searching a table for a value and want to know what row and column it's in, you cant have duplicates in the table.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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