Looking up a partial match on a second table

Rhewtani

New Member
Joined
Jan 18, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Okay, this is my first time asking a question in excel in 25 years. I've been able to figure out everything else. :cautious:

I've got data coming in from a bank feed. I want to look for key words in the description and match it with a table I have on a separate tab and get the xlookup result. For instance, if a cell contains the text "bcb" anywhere in it, I want it to look up bcb on the table and return "blue cross." In this way I'm mapping BCBS and BCBSF (each rows in that table) to blue cross.

Any ideas? The current process is memorizing all the possible codings and typing them into a manual field and having it look it up for me. There's often a string of numbers and letters before were the key words appear and it varies in length.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
That definitely taught me something new. Here's an image of my exact issue. I want a formula in column E returning the result from the table in H:I on the match within the text in column B.

Make sense?
 

Attachments

  • lookupproblem.JPG
    lookupproblem.JPG
    73.2 KB · Views: 26
Upvote 0
Well, it's not an xlookup and definitely not the best way of doing it, but here is a solution. I don't think you can accomplish this with an xlookup.

Book1
ABCDEFGHI
1
2DateDescriptionAmount
3
418-JanOther Receipt: HCCLAIMPMT HMP C100HMPHMPHMP
518-JanOther Receipt: HCCLAIMPMT HUMAN100HumanaHUMANHumana
618-JanOther Receipt: HCCLAIMPMT HUMAN100HumanaSUNSHSunshine State
718-JanOther Receipt: HCCLAIMPMT SUNSH50Sunshine State
818-JanOther Receipt: HCCLAIMPMT Simpl100No Match
918-JanOther Receipt: Amerigroup TX5C100No Match
1018-JanOther Receipt: Devoted Health P150No Match
1118-JanOther Receipt: HUMANA GOVT BUSI75Humana
1218-JanOther Receipt: HUMANA INS CO100Humana
1318-JanOther Receipt: SUNSHINE STATE H150Sunshine State
Sheet1
Cell Formulas
RangeFormula
E4:E13E4=IF(COUNTIF($B4,"*"&$H$4&"*"),$I$4,IF(COUNTIF($B4,"*"&$H$5&"*"),$I$5,IF(COUNTIF($B4,"*"&$H$6&"*"),$I$6,"No Match")))
 
Upvote 0
Hi,

See if this accomplishes what you need:

Book3.xlsx
ABCDEFGHI
2DateDescriptionAmount
3
41/18/2022Other Receipt: HCCLAIMPMT HMP C100HMPHMPHMP
51/18/2022Other Receipt: HCCLAIMPMT HUMAN100HumanaHUMANHumana
61/18/2022Other Receipt: HCCLAIMPMT HUMAN100HumanaSUNSHSunshine State
71/18/2022Other Receipt: HCCLAIMPMT SUNSH50Sunshine State
81/18/2022Other Receipt: HCCLAIMPMT Simpl100No Match
91/18/2022Other Receipt: Amerigroup TX5C100No Match
101/18/2022Other Receipt: Devoted Health P150No Match
111/18/2022Other Receipt: HUMANA GOVT BUSI75Humana
121/18/2022Other Receipt: HUMANA INS CO100Humana
131/18/2022Other Receipt: SUNSHINE STATE H150Sunshine State
Sheet945
Cell Formulas
RangeFormula
E4:E13E4=IFERROR(LOOKUP(2,1/SEARCH(H$4:H$6,B4),I$4:I$6),"No Match")


EDIT NOTE: Just expand the H & I Column range sizes in the formula to fit your entire table.
 
Last edited:
Upvote 0
Another option
+Fluff 1.xlsm
ABCDEFGHI
1
2DateDescriptionAmount
3
41/18/2022Other Receipt: HCCLAIMPMT HMP C100HMPHMPHMP
51/18/2022Other Receipt: HCCLAIMPMT HUMAN100HumanaHUMANHumana
61/18/2022Other Receipt: HCCLAIMPMT HUMAN100HumanaSUNSHSunshine State
71/18/2022Other Receipt: HCCLAIMPMT SUNSH50Sunshine State
81/18/2022Other Receipt: HCCLAIMPMT Simpl100 
91/18/2022Other Receipt: Amerigroup TX5C100 
101/18/2022Other Receipt: Devoted Health P150 
111/18/2022Other Receipt: HUMANA GOVT BUSI75Humana
121/18/2022Other Receipt: HUMANA INS CO100Humana
131/18/2022Other Receipt: SUNSHINE STATE H150Sunshine State
14
Lists
Cell Formulas
RangeFormula
E4:E13E4=FILTER($I$4:$I$6,ISNUMBER(SEARCH($H$4:$H$6,B4)),"")
 
Upvote 0
@Fluff, you always amaze me. The formulas I come up with work but when I come up with something like this
=IF(COUNTIF($B4,"*"&$H$4&"*"),$I$4,IF(COUNTIF($B4,"*"&$H$5&"*"),$I$5,IF(COUNTIF($B4,"*"&$H$6&"*"),$I$6,"No Match")))
You come up with this. Great job and so much simpler.
=FILTER($I$4:$I$6,ISNUMBER(SEARCH($H$4:$H$6,B4)),"")
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,668
Members
448,977
Latest member
moonlight6

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