Stack Text in Cells

GMC The Macro Man

Board Regular
Joined
Mar 23, 2023
Messages
64
Office Version
  1. 2021
Platform
  1. Windows
Hi guys

I am trying to present the TEXT in Cell A2 to look like Cell A3. - Now before you all jump in.... I know it's ALT + Enter after each comma. My question is this. I have 300 Lines in Column A that look like Cell A2 and I don't want to have to go in to every individual cell and press ALT + Enter. I looked at Delimiter but that just wants top split it into separate columns.
Can anyone advise on a way to solve this.
Thanks in Advance


1684750920891.png
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Try and do a wrap text

Excel Practice 05.22.2023.xlsx
AB
1Text1, Text2, Text3, Text4Text1, Text2, Text3, Text4
Sheet2
Cell Formulas
RangeFormula
B1B1=SUBSTITUTE(A1," ",CHAR(10))
 
Upvote 0
Solution
  • Select the column
  • Invoke Find/Replace (Ctrl+H)
  • Find what: Type a comma followed by a space
  • Replace with: Type a comma followed by Ctrl+J
  • Replace All
  • Set Wrap Text for the column
 
Upvote 1
You're welcome!
Have you tried a solution by Peter, it works without a formula.
 
Upvote 0
Thank you for taking the time to look at this and getting a resolve. It worked perfectly
Does that mean there are no other spaces in your text apart from immediately after a comma?

If there is, look in column B below to see what the formula does.
If you are going to use a formula and not the direct method that I suggested above, then it would be safer to use the formula in column C below.

23 05 22.xlsm
ABC
1Text 1, Text 2, Text 3, Text 4Text 1, Text 2, Text 3, Text 4Text 1, Text 2, Text 3, Text 4
Wrap Text (2)
Cell Formulas
RangeFormula
B1B1=SUBSTITUTE(A1," ",CHAR(10))
C1C1=SUBSTITUTE(A1,", ",","&CHAR(10))
 
Upvote 0
  • Select the column
  • Invoke Find/Replace (Ctrl+H)
  • Find what: Type a comma followed by a space
  • Replace with: Type a comma followed by Ctrl+J
  • Replace All
  • Set Wrap Text for the column
Thanks for taking the time to reply to my question. Your solution worked very similar to that of SUFIYAN97. Cheers
 
Upvote 0

Forum statistics

Threads
1,215,092
Messages
6,123,063
Members
449,090
Latest member
fragment

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