Split Text String based on listing

Lenard

New Member
Joined
Jan 19, 2010
Messages
35
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I have a set of data in column A with text string in each row under Data sheet and would like to split text string in each row based on a listing of keywords ( Unique name ) under List sheet.
I copied set of formulas from google search and modified, the result is not met my expectation.

{=IFERROR(INDEX(List!$A$2:$A$71, SMALL(IF(COUNTIF($A2, "*"&List!$A$2:$A$71&"*"), MATCH(ROW(List!$A$2:$A$71), ROW(List!$A$2:$A$71)), ""), COLUMNS($M$1:M1))), "")}

Sample file_working.xlsx
A
1Keyword
2ABS
3ADDRESS
4AGGREGATE
5AND
6AVERAGE
7CELL
8COLUMN
9CONCAT
10COUNT
11COUNTA
12COUNTBLANK
13COUNTIF
14COUNTIFS
15DATE
16EDATE
17EOMONTH
18EXACT
19FILTER
20FIND
21FLOOR
22FREQUENCY
23HYPERLINK
24IF
25INDEX
26INDIRECT
27ISBLANK
28ISERR
29ISERROR
30ISNA
31ISNUMBER
32LARGE
33LEFT
34LEN
35LET
36LOWER
37MATCH
38MAX
39MID
40MIN
41MMULT
42MOD
43NOT
44ODD
45OFFSET
46OR
47POWER
48PROPER
49RANK
50REPT
51RIGHT
52ROW
53SEARCH
54SEQUENCE
55SMALL
56SORT
57SUBTOTAL
58SUM
59SUMIF
60SUMPRODUCT
61TEXT
62TODAY
63TRANSPOSE
64UNIQUE
65UPPER
66LOOKUP
67XLOOKUP
68HLOOKUP
69VLOOKUP
70WEEKDAY
71YEAR
List


Sample file_working.xlsx
ABCDEFGHIJ
1DataResults
2COUNTIFSFINDLEFTRIGHTCOUNTCOUNTIFCOUNTIFSFINDIFLEFTRIGHT
3COUNTIFSDATECOUNTCOUNTIFCOUNTIFSDATEIF  
4COUNTIFSCOUNTIFCOUNTCOUNTIFCOUNTIFSIF   
5COUNTIFCOUNTCOUNTIFIF    
6SUMPRODUCTEXACTEXACTSUMSUMPRODUCT    
7COUNTIFSUMPRODUCTISNUMBERMATCHCOUNTCOUNTIFCOUNTIFSIFISNUMBERMATCHSUMSUMPRODUCT
8COUNTIFSUMPRODUCTCOUNTCOUNTIFCOUNTIFSIFSUMSUMPRODUCT  
9MATCHISNASUMPRODUCTCOUNTACOUNTIFCOUNTCOUNTACOUNTIFIFISNAMATCHSUMSUMPRODUCT
10COUNTIFSSUMPRODUCTCOUNTCOUNTIFCOUNTIFSIFSUMSUMPRODUCT  
11SUMPRODUCTLENNLENSUMSUMPRODUCT     
12COUNTBLANKCOUNTACOUNTCOUNTACOUNTBLANK     
13COUNTACOUNTIFCOUNTIFSCOUNTCOUNTACOUNTIFCOUNTIFSIF   
14COUNTIFCOUNTIFSCOUNTCOUNTIFCOUNTIFSIF   
15SUMPRODUCTISNUMBERFINDFINDISNUMBERSUMSUMPRODUCT   
16COUNTIFSUMPRODUCTISNUMBERFINDCOUNTCOUNTIFCOUNTIFSFINDIFISNUMBERSUM
17SUMPRODUCTISERRORISERRSUMISERRISERRORORSUMSUMPRODUCT  
18COUNTSUMPRODUCTCOUNTSUMSUMPRODUCT    
19SUMPRODUCTMODMODSUMSUMPRODUCT    
20COUNTIFSUMPRODUCTFINDISNUMBERCOUNTCOUNTIFCOUNTIFSFINDIFISNUMBERSUMSUMPRODUCT
21COUNTIFISTEXTSUMPRODUCTCOUNTIFSCOUNTCOUNTIFCOUNTIFSIFSUMSUMPRODUCTTEXT
22ISERRORNOTSUMPRODUCTISERRISERRISERRORNOTORSUMSUMPRODUCT 
23ISNUMBERSEARCHMMULTTRANSPOSEISNUMBERMMULTSEARCHTRANSPOSE   
24SUMPRODUCTWEEKDAYSUMSUMPRODUCTWEEKDAY    
25YEARSUMPRODUCTSUMSUMPRODUCTYEAR    
26SUMPRODUCTSUMSUMPRODUCT     
27COUNTIFSCOUNTCOUNTIFCOUNTIFSIF   
28SUMPRODUCTCOUNTIFCOUNTCOUNTIFIFSUMSUMPRODUCT  
29SUMPRODUCTISNUMBERMATCHSEARCHISNUMBERMATCHSEARCHSUMSUMPRODUCT  
30SUMPRODUCTISNAMATCHISNAMATCHSUMSUMPRODUCT   
Data
Cell Formulas
RangeFormula
C21:I30,C20:J20,C14:I19,C7:J13,C2:I6C2=IFERROR(INDEX(List!$A$2:$A$71, SMALL(IF(COUNTIF($A2, "*"&List!$A$2:$A$71&"*"), MATCH(ROW(List!$A$2:$A$71), ROW(List!$A$2:$A$71)), ""), COLUMNS($M$1:M1))), "")
Press CTRL+SHIFT+ENTER to enter array formulas.



The expected result is to separate text string in each row by columnar result or the result can be concatenated with "+" as per sample below : -

1628573847220.png


Or Expected Results :-
1628573920300.png



Appreciate if someone can help to use better set of formulas or vba to solve the above problem
Thanks in advance

Regards
Lenard
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,820
Messages
6,181,154
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