Instructions automatic text carriage return in Excel - Auto line breaks when the width of the column in Excel

When working with Excel files when you type content for a cell with long content, the letters will not automatically enter the line, but will be overwritten in the next column. The following article shows you how to auto-wrap text in Excel - Auto-wrap text at the end of the column width in Excel.

For example, when typing the text into cell C3 exceeds the width of the column so the text is obscured and not displayed:

Instructions automatic text carriage return in Excel - Auto line breaks when the width of the column in Excel Picture 1

1. For a cell that is an original cell (do not merge other column or row cells into 1), it is very simple:

- Select the cell you want to automatically drop text when the width of the column ends -> go to Home tab -> Alignment -> select Wrap Text feature :

Instructions automatic text carriage return in Excel - Auto line breaks when the width of the column in Excel Picture 2

- After selecting the option Wrap Text -> text content in the cell automatically down the line when the width of the column:

Instructions automatic text carriage return in Excel - Auto line breaks when the width of the column in Excel Picture 3

2. With data cells assembled from multiple cells

- The case with Excel cells is aggregated from many other cells if using Text Wrap feature to wrap text content when the column width is empty but the height of the cell does not change so the text is still covered. For example, when merging cell B4 and cell C4 into one cell after entering the content, selecting the Wrap Text feature does not automatically go down the line when the width of the column is over:

Instructions automatic text carriage return in Excel - Auto line breaks when the width of the column in Excel Picture 4

- In this case (the cells are aggregated from many other cells) you need to use additional code after selecting the Wrap Text feature :

+ Select the Excel file that you want to automatically move the text down the width of the column -> press Alt + F11 to enter the command window -> copy the following code for the Change event of the worksheet:

 Private Sub Worksheet_Change (ByVal Target As Range) Dim NewRwHt As Single Dim cWdth As Single, MrgeWdth As Single Dim c As Range, cc As Range Dim ma As Range With Target If .MergeCells And .WrapText Then Set c = Target.Cells (1 , 1) cWdth = c.ColumnWidth Set ma = c.MergeArea For Each cc In ma.Cells MrgeWdth = MrgeWdth + cc.ColumnWidth Next Application.ScreenUpdating = False ma.MergeCells = False c.ColumnWidth = MrgeWdth c.EntireRow.AutoFit NewRwHt = c.RowHeight c.ColumnWidth = cWdth ma.MergeCells = True ma.RowHeight = NewRwHt cWdth = 0: MrgeWdth = 0 Application.ScreenUpdating = True End If End With End Sub 
Instructions automatic text carriage return in Excel - Auto line breaks when the width of the column in Excel Picture 5

+ After typing the above code to save and exit VBA, return to the Excel file to re-enter the content for the cell just created the text content automatically down the line when the width of the column and the height of the cell is changed. , unbleached text content:

Instructions automatic text carriage return in Excel - Auto line breaks when the width of the column in Excel Picture 6

The above is a detailed guide on how to auto-wrap text in Excel - Auto-break line at the end of the column width in Excel version 2016. I wish you success!

4 ★ | 23 Vote

May be interested

  • Word 2016 Complete Guide (Part 13): Divide the text columnWord 2016 Complete Guide (Part 13): Divide the text column
    split text columns is one of the familiar features when formatting text, especially with newspapers and magazines.
  • Format column text in WordFormat column text in Word
    instructions for formatting text columns in word. there are 2 ways to format text columns in word. method 1: divide the column first and draft the text later. - go to page layout - columns tab - select the number of columns to divide, excel 2013 supports 1 number of split column formats you just need.
  • Change the width of columns and the height of rows in ExcelChange the width of columns and the height of rows in Excel
    the default column widths and row heights in excel may not match the data you enter. you want to change the width, height of rows and columns so that data is displayed fully on cells in excel.
  • How to create page breaks and page breaks in ExcelHow to create page breaks and page breaks in Excel
    how to create page breaks and page breaks in excel. page breaks in excel make it easy to choose to print an area or any data range. in this article, you can create page breaks and page breaks on excel spreadsheets to help you print easily.
  • Table operations in ExcelTable operations in Excel
    instructions on table operations in excel. when working with tables you should pay attention to the following: 1. edit the width of rows and columns. there are many ways to edit the widths of rows and columns. method 1: with the column moving into the vertical bar of the column - when the child
  • Steps to lock columns in ExcelSteps to lock columns in Excel
    locking columns in excel with a password helps you protect columns, prevent others from changing column content or editing columns, affecting all data of the table.
  • Different Platforms in GitDifferent Platforms in Git
    gnu / linux and mac os use line-feed (lf), or a new line when line-ending characters while windows uses line-feed combination and carriage-return (lfcr) to signify the ending of the character line ends.
  • Ways to hide data on ExcelWays to hide data on Excel
    hiding or showing data on excel will help you hide the data you don't want to see. and users can use the function on the hidden data.
  • How to use pictures as Excel chart columnsHow to use pictures as Excel chart columns
    excel offers a variety of chart types. however, you don't have to use columns; you can use images instead to make your charts more appealing.
  • How to delete, add columns in ExcelHow to delete, add columns in Excel
    adding columns in excel or deleting columns is a basic operation and very simple in excel when we process excel tables.