Cross referencing another cell from one table and returning a value from INDEX MATCH from another table

Aeruja

New Member
Joined
Aug 25, 2013
Messages
6
I'm using Google Sheets

What I want to get this formula to do is to return a T/F boolean value to the checkbox if the cell in G25 contains one of the following substrings:

"TWT-0???-????","TWL-0???-????","TWV-0???-????","TWA-0???-????","TET-0???-????","TEL-0???-????","TEV-0???-????","TEA-0???-????","TCT-0???-????","TCL-0???-????","TCV-0???-????","TCA-0???-????","T?T-0???-????","T?L-0???-????","T?V-0???-????","T?A-0???-????"

and I would be using SEARCH in G25 to find this..

Then afterwards, I'd compare the string found to another table with INDEX MATCH to find its status in that other spreadsheet, if that checkbox is TRUE, then return TRUE in the checkbox in this spreadsheet too.

..but I can't figure out the logic of how to make that work.

What I have tried:

=IFERROR(INDEX('Transits/Collars'!$B$2:$F$115,MATCH(MID($F25,SEARCH(OR("TWT-0???-????","TWL-0???-????","TWV-0???-????","TWA-0???-????","TET-0???-????","TEL-0???-????","TEV-0???-????","TEA-0???-????","TCT-0???-????","TCL-0???-????","TCV-0???-????","TCA-0???-????","T?T-0???-????","T?L-0???-????","T?V-0???-????","T?A-0???-????"),$F25),13),'Transits/Collars'!$B$2:$B$115,0),5),"")
 

Attachments

  • Screenshot 2023-11-23 131449.png
    Screenshot 2023-11-23 131449.png
    37.7 KB · Views: 10
  • Screenshot 2023-11-23 131840.png
    Screenshot 2023-11-23 131840.png
    8.1 KB · Views: 9

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Am no Google Sheets expert so this may not be syntactically correct, I'm more Excel and even that's not up to date.
But in Excel I don't think you can use that syntax ...SEARCH(OR(...)) to get what you want
OR() is logical test between multiple parameters, it will take ALL the parameters, apply OR() to them all and result in ONE value. So you're only SEARCH()ing for ONE value.
You need a separate SEARCH for each item you're searching for.
You're also overdoing your search terms

These searches
TWT-0???-????","TWL-0???-????","TWV-0???-????","TWA-0???-????","TET-0???-????","TEL-0???-????","TEV-0???-????","TEA-0???-????","TCT-0???-????","TCL-0???-????","TCV-0???-????","TCA-0???-????",

will be picked up by simply doing these searches
T?T-0???-????","T?L-0???-????","T?V-0???-????","T?A-0???-????"
so you dont need the searches mentioned previously.

Questions
Will that cell contain more than ONE of the searches, or simply just one or none at all?
If only one, try this (untested)

=IF(NOT(ISERROR(SEARCH("T?T-0???-????",G25)))+NOT(ISERROR(SEARCH("T?L-0???-????",G25)))+
NOT(ISERROR(SEARCH("T?V-0???-????",G25)))+
NOT(ISERROR(SEARCH("T?A-0???-????",G25)))<>0,G25,"")

This should return the value in G25 or a blank.
You'll then need to do an INDEX MATCH in the other table.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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