Formula to Add Hard Space

legalhustler

Well-known Member
Joined
Jun 5, 2014
Messages
1,214
Office Version
  1. 365
Platform
  1. Windows
I have the following various length text string:

Hello World 123 abc; Love Excel 365

I would like to substitute the ";" plus one space with a hard space so that I get my results to show in two separate lines like this:

Hello World 123 abc
Love Excel 365

Can someone assist with the formula?

Thanks!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I have the following various length text string:

Hello World 123 abc; Love Excel 365

I would like to substitute the ";" plus one space with a hard space so that I get my results to show in two separate lines like this:

Hello World 123 abc
Love Excel 365

Can someone assist with the formula?
Give this formula a try...

=SUBSTITUTE(A1,"; ",CHAR(10))

Note that you will have to turn "Wrap Text" on for the cell that you put this formula in (and maybe widen the cell's column) so that the returned value will display on multiple lines.
 
Upvote 0
Use the replace box
Select the col you want > Ctrl H > enter "; " (without quotes) in the Find What box > Ctrl J in the Replace with Box > Replace All
 
Upvote 0
Use the replace box
Select the col you want > Ctrl H > enter "; " (without quotes) in the Find What box > Ctrl J in the Replace with Box > Replace All

Are there any other shortcut letters that do different things? This is the time I've seen this.
 
Upvote 0
Woah, what is ctrl J? That is pretty slick.
It is an old teletype control character for a line feed (it moved the typing down one line) that Microsoft's QBASIC, VB and VBA has spotily maintained. Some control characters are sometimes still (but not always) supported such as in the Find or Replace dialogs. Note that if you look carefully after issuing the CTRL+J keystroke the Find or Replace dialog box, you can see a small blinking dot along the bottom of the text field... that is the blinking text cursor located on the line below showing through... you can see this by pressing the left arrow after issuing the CTRL+J keystroke and the text cursor will appear in the text field... then if you next press the right arrow, the blinking dot will reappear.
 
Last edited:
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