Split multiple text in cell into multiple rows

ConfusedMum

New Member
Joined
Apr 22, 2013
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi all,

This should be really easy, I am sure, but I am totally stuck! I know about Text to Columns, but that doesn't seem to work if you have multiple text to split :( and I am not sure where to go next with this.

This is an example of what I have got at the moment:
Postcode Areas TEST.jpg


What I am trying to get is this:
Postcode Areas TEST2.jpg

So I can split the postcodes into alphabetical order, with the sales person linked to that postcode, into individual rows; then I can add extra details like region, admin contact, supervisor, etc...

Any ideas wonderful Excel guru people please, please, please?

Thank you SO much,
Cathy
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Please update your account details to indicate which version of Office you are using. Additionally, please upload your sample data using XL2BB.
 
Upvote 0
If you happen to have 365, you can try:

Book7
ABCDEF
1SalespersonPostcodes ServedPostcodePerson
2Person 1P1;P2;P3C4Person 3
3Person 2P4;P5;P6;P7C5Person 3
4Person 3C4;C5;C6C6Person 3
5Person 4P11;P12;P13M44Person 5
6Person 5M44;M45;M46;M47M45Person 5
7M46Person 5
8M47Person 5
9P1Person 4
10P11Person 4
11P12Person 4
12P13Person 4
13P2Person 1
14P3Person 1
15P4Person 2
16P5Person 2
17P6Person 2
18P7Person 2
Sheet1
Cell Formulas
RangeFormula
E2:E18E2=SORT(TEXTSPLIT(TEXTJOIN(";",TRUE,Table1[Postcodes Served]),,";"))
F2:F18F2=INDEX(Table1[Salesperson],MAX(IFERROR(SIGN(SEARCH(E2,Table1[Postcodes Served]))*SEQUENCE(ROWS(Table1[Postcodes Served])),0)))
Dynamic array formulas.
 
Upvote 0
工作簿1
ABCDEFG
1SalespersonPostcodes ServedPostcodePerson
2Person 1P1;P2;P3P1Person 1
3Person 2P4;P5;P6;P7P2Person 1
4Person 3C4;C5;C6P3Person 1
5Person 4P11;P12;P13P4Person 2
6Person 5M44;M45;M46;M47P5Person 2
7P6Person 2
8P7Person 2
9C4Person 3
10C5Person 3
11C6Person 3
12P11Person 4
13P12Person 4
14P13Person 4
15M44Person 5
16M45Person 5
17M46Person 5
18M47Person 5
19
Sheet1
Cell Formulas
RangeFormula
E1:F18E1=REDUCE({"Postcode","Person"},A2:A6,LAMBDA(x,y,VSTACK(x,IF({1,0},TEXTSPLIT(OFFSET(y,,1),,";"),y))))
Dynamic array formulas.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
SORRY, I have done that now.
I am using Office 365 on a Windows 10 PC.

Thanks loads (again!)
Cathy
 
Upvote 0
Thanks for that (y). Do either of the solutions do what you need?
 
Upvote 0
Here is an alternative solution with Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(Source, {{"Postcodes Served", Splitter.SplitTextByDelimiter(";", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Postcodes Served")
in
    #"Split Column by Delimiter"
Book5
ABCDE
1SalespersonPostcodes ServedSalespersonPostcodes Served
2Person 1P1;P2;P3Person 1P1
3Person 2P4;P5;P6;P7Person 1P2
4Person 3C4;C5;C6Person 1P3
5Person 4P11;P12;P13Person 2P4
6Person 5M44;M45;M46;M47Person 2P5
7Person 2P6
8Person 2P7
9Person 3C4
10Person 3C5
11Person 3C6
12Person 4P11
13Person 4P12
14Person 4P13
15Person 5M44
16Person 5M45
17Person 5M46
18Person 5M47
Sheet1
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,956
Members
449,096
Latest member
Anshu121

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