Header Return with PARTIAL Text Match

Batata

New Member
Joined
Jul 7, 2022
Messages
18
Office Version
  1. 365
Platform
  1. Windows
Hello Exel team,

I hope everyone has been doing great; it's been a while. I'm back today, and I'm seeking help. As you can see, I have manual input data on columns [B, C], and I have a table called CATAG where I have partial tet from column C items. I have been trying, and as you can see, all the yellow highlighted columns to return the table header as it should be in the D column highlighted in green, with no luck.

The idea is to have the formula loop all the inputs in column C and search through all the table content, match partial of the text in the table with the full text in column C, and return in column D the header name and if its not found return " - ", like what the example have in column D " I did entered the matching manual there just for the example"

I appreciate all your time and help.

Thank you
Batata

New Data.xlsx
BCDEFGHIJKLMNOPQRST
1
2AmountDescriptionReturnReturnReturnReturnReturnReturnReturnReturnReturnReturnReturn
3-194.44eBay O*07-09272-79640 408-3766151 CA 10/28Online Orders#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
4146.77GEICO *AUTO 800-000-0000 DC 10/28Office#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
5-19.47GOOGLE *YouTubePremi g.co/helppay# CA 10/24Subsecribtion#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
6-12.79WHOLEFDS POA #10 1700 359323 10/23-#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!SubsecribtionofficeEnergyOnline Orders
7-48.92SPLASH #10 1700 35124681 10/23-#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!NETFLIX.COMExperianGexaEbay
8-120.99GEXA ENERGY 866-00-0000 10/22Energy#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!*YouTubeDomain.comMMMS.comamazon.com
9-400ORIG CO NAME:GOOGLE STORE ORIG DESC GOOGLE STORE#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!GEICOUBER
10-139.97UBER EATS HELP.UBER.COM CA 10/17Online Orders#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!GOOGLE STORE
11Experian* Credit Repor 479-0000000 CA 10/16Office#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
12-1073.21ORIG CO NAME:MMMS.COM ORIG DESC Energy#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
13-5.32EIG*Domain.com 866-0000000 MA 10/11Office#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
14-21.88NETFLIX.COM NETFLIX.COM CA 10/27Subsecribtion#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
15
Sheet1
Cell Formulas
RangeFormula
E3:E14E3=INDEX(CATAG,1,MATCH(1,--(ISNUMBER(SEARCH(C3,CATAG))),0))
F3:F14F3=INDEX(CATAG,1,MATCH(1,--(ISNUMBER(SEARCH(C3,CATAG))),0))
G3:G14G3=INDEX(CATAG,MATCH(MIN(IF(SEARCH(C3,CATAG)>0,SEARCH(C3,CATAG))),IF(SEARCH(C3,CATAG)>0,SEARCH(C3,CATAG)),0),1)
H3:H14H3=INDEX(CATAG,MATCH(C3,CATAG,0),1)
I3:I14I3=INDEX(CATAG,MATCH(C3,TRANSPOSE(CATAG),0),1)
J3:J14J3=INDEX(CATAG,1,MATCH(TRUE,SEARCH(C3,CATAG)>0,0))
K3:K14K3=INDEX(CATAG,1,MATCH(MIN(IF(SEARCH("*"&C3&"*",CATAG)>0,SEARCH("*"&C3&"*",CATAG))),IF(SEARCH("*"&C3&"*",CATAG)>0,SEARCH("*"&C3&"*",CATAG)),0))
L3:L14L3=INDEX(CATAG,1,MATCH(TRUE,ISNUMBER(SEARCH(C3,CATAG)),0))
M3:M14M3=INDEX(CATAG,1,AGGREGATE(15,6,COLUMN(CATAG)/((CATAG<>"")*(COUNTIF(CATAG,C3)>0)),1))
N3:N14N3=INDEX(CATAG,1,AGGREGATE(15,6,COLUMN(CATAG)/(ISNUMBER(SEARCH(C3,CATAG))),1))
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Not fully sure with your requirement

See if this helps:

Book5
BCDEFGHIJKLMNOPQRSTU
2
3AmountDescriptionReturnReturnReturnReturnReturnReturnReturnReturnReturnReturnReturnReturn
4-194.44eBay O*07-09272-79640 408-3766151 CA 10/28Online OrdersOnline Orders#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
5146.77GEICO *AUTO 800-000-0000 DC 10/28Officeoffice#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
6-19.47GOOGLE *YouTubePremi g.co/helppay# CA 10/24SubsecribtionSubsecribtion#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
7-12.79WHOLEFDS POA #10 1700 359323 10/23- #N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!SubsecribtionofficeEnergyOnline Orders
8-48.92SPLASH #10 1700 35124681 10/23- #N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!NETFLIX.COMExperianGexaEbay
9-120.99GEXA ENERGY 866-00-0000 10/22EnergyEnergy#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!*YouTubeDomain.comMMMS.comamazon.com
10-400ORIG CO NAME:GOOGLE STORE ORIG DESC GOOGLE STOREoffice#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!N/AGEICON/AUBER
11-139.97UBER EATS HELP.UBER.COM CA 10/17Online OrdersOnline Orders#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!N/AGOOGLE STOREN/AN/A
12Experian* Credit Repor 479-0000000 CA 10/16Officeoffice#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
13-1073.21ORIG CO NAME:MMMS.COM ORIG DESC EnergyEnergy#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
14-5.32EIG*Domain.com 866-0000000 MA 10/11Officeoffice#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
15-21.88NETFLIX.COM NETFLIX.COM CA 10/27SubsecribtionSubsecribtion#N/A#N/A#VALUE!#N/A#N/A#N/A#VALUE!#N/A#NUM!#NUM!
16
Sheet1
Cell Formulas
RangeFormula
E4:E15E4=IFERROR(INDEX($Q$7:$T$7,,AGGREGATE(15,6,COLUMN($Q$7:$T$7)-COLUMN($Q$7)+1/ISNUMBER(SEARCH($Q$8:$T$11,C4)),1)),"")
Named Ranges
NameRefers ToCells
Catag=Sheet1!$Q$7:$T$11E4:E15


Note:
Do not keep any of the blank cells in Catag table just put "N/A" instead of blank
 
Upvote 1
Solution
@Sufiyan97 Sorry for the late response; it is working perfectly. The highlighted column in yellow was me trying to figure out the formula. Thank you for your help
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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