Matching a partial string to a list of longer strings

cyburban

New Member
Joined
Aug 31, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to match a string to another longer string. The string I am using has at least some overlap to the table I am searching for results in. Sometimes the string I am searching for is in the 2nd half of the string being searched for

This is what I am searching. Possible search values are "Direct", "Direct Drive", "Belt", "Belt Drive". I have tried using xlookup with the following formula. =XLOOKUP(C2,Table516[Fan Type],Table516[Fan Type],C2,1) Basically I am trying to match Direct to "Direct Drive" and Belt Drive or Belt to "Pulleys / Belts". It seems like excel might not be capable of this type of approximate matching? Would I be better off typing a nested IF statement formula since the number of cases I have is somewhat limited? I am dealing with human input so there is a chance stuff isn't inputted exactly the same each time. Any suggestions for how to get this working would be greatly appreciated.


1695844116223.png
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try this for a couple options...
Book1
ABCD
55larger stringsmall stringLocationT/F
56your belt is on backwardsbelt6TRUE
Sheet1
Cell Formulas
RangeFormula
C56C56=SEARCH(B56,A56,1)
D56D56=ISNUMBER(SEARCH(B56,A56,1))

Hope that helps,

Doug
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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