Wrap Text Into Next Row, Not The Same Row

miketurn

Active Member
Joined
Dec 8, 2016
Messages
268
Hello Everyone,

I would imagine that this cannot be done because I don't think Excel would be able to know how to do this but I figured I would ask just in case. (I have done some research for this as well with no positive info found)

Say you have a row of text that goes beyond its columns width by a good amount
I am looking for I would guess, some kind of Macro that would allow me to select that row, apply a macro and it would....
Take the text within the row and break it up into rows of text based on the width of the column.

I am aware that you can turn on a text wrap and it will automatically change the height of the row based on the text within it.
That is not what I am looking for, I want it to break the text down into separate rows using the columns width to know when to move the text to the next row. It would break the text down into as many rows as it needs.

Simplistic Example

So text is in COLUMN A - ROW 10 and the COLUMN A width ends right after apple

COLUMN A
ROW 10 | apple | orange banana


I want it to do this

COLUMN A
ROW 10 | apple |
ROW 11 | orange |
ROW 12 | banana |


Like I said I would imagine Excel does not have the ability to know how to do this, but maybe?
I have seen some pretty incredible macros created by others, so I figured I would take a shot to see if anyone has any ideas of how this can be done.

Thank You to anyone who reads this
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try this:

Select the range on the row and run this Macro:

Code:
Sub Justify_Selection()
Application.DisplayAlerts = False
Dim c As Range
    For Each c In Selection
     c.Justify
    Next
End Sub

Hi how are you? I would appreciate your help.
When I mark a few lines to run the code on them then there is text in certain lines that is deleted.
 

Attachments

  • Screenshot 2021-03-19 021846.png
    Screenshot 2021-03-19 021846.png
    23.8 KB · Views: 12
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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