Replace all semicolons with line breaks

mikec82

Board Regular
Joined
Jan 13, 2009
Messages
225
I have a spreadsheet that looks like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Student[/TD]
[TD]Course[/TD]
[/TR]
[TR]
[TD]John Smith[/TD]
[TD]English;Math;Science;History[/TD]
[/TR]
[TR]
[TD]Jane Smith[/TD]
[TD]Math;History;Art[/TD]
[/TR]
</tbody>[/TABLE]

I would like to replace all semicolons with line breaks if possible, so that it would appear like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Student[/TD]
[TD]Course[/TD]
[/TR]
[TR]
[TD]John Smith[/TD]
[TD]English
Math
Science
History[/TD]
[/TR]
[TR]
[TD]Jane Smith[/TD]
[TD]Math
History
Art[/TD]
[/TR]
</tbody>[/TABLE]


Is this possible?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi,

If you're looking for a formula solution:


Excel 2010
ABC
1StudentCourse
2John SmithEnglish;Math;Science;HistoryEnglish Math Science History
3Jane SmithMath;History;ArtMath History Art
Sheet18
Cell Formulas
RangeFormula
C2=SUBSTITUTE(B2,";",CHAR(10))


C2 formula copied down, don't forget to "Wrap Text"
 
Upvote 0
I have a spreadsheet that looks like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Student[/TD]
[TD]Course[/TD]
[/TR]
[TR]
[TD]John Smith[/TD]
[TD]English;Math;Science;History[/TD]
[/TR]
[TR]
[TD]Jane Smith[/TD]
[TD]Math;History;Art[/TD]
[/TR]
</tbody>[/TABLE]

I would like to replace all semicolons with line breaks if possible, so that it would appear like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Student[/TD]
[TD]Course[/TD]
[/TR]
[TR]
[TD]John Smith[/TD]
[TD]English
Math
Science
History[/TD]
[/TR]
[TR]
[TD]Jane Smith[/TD]
[TD]Math
History
Art[/TD]
[/TR]
</tbody>[/TABLE]

Is this possible?
Select the entire column with your semi-colons, press CTRL+H to bring up Excel's Replace dialog box, put a single semi-colon in the "Find what" field, select the "Replace with" field and key in CTRL+J (it will look like nothing happened but it did), then click the "Options>>" button and make sure none of the checkboxes are checked, then click the "Replace All" button.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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