Several ways to change lines in Excel cells

Source: Internet
Author: User
Tags word wrap

1, in the cell automatically wraps. Select the cell that you want to wrap, and then in the format → cell command, in snap to in the Cell Format dialog box, select Word Wrap under Text control to enable the text to wrap in the cell. This is the most commonly used method of wrapping a cell, so the advantage is that when the width of the cell changes, the contents of the cell change automatically.

2, in the cell to force line wrapping. When you enter content, when you want to wrap, press Atl+enter (enter) to force a newline. This action is to enter a newline character, when the cell width changes, the contents of the cell will not affect!

3, the content rearrangement. The above two methods, which are said to be a row in a cell, if we want to, when the contents of the cell exceeds the width of the cell, the excess, go to the next cell in the same column, you need to use content rearrangement!

This feature is in Excel2003 or the following edition, in the Edit menu fill item, and in Excel2007, you need to call out this item, the method is: Click the Office Button, select Excel option, in the customization from the "following location select Commands" Choose to start the pick of the card can find a "content rearrangement" function, add it to the custom Access Toolbar.

Using the method, you select the cells that need to rearrange the content, and then use the "Content rearrangement" feature. Note that even if you select more than one column, you can only rearrange the contents of the first column, and if you select multiple rows, the empty cells in the middle of the contents of the cell separated, Excel will it as two pieces of content rearrangement, otherwise it is considered a piece of content.

4, the use of text boxes. The method is to use a text box, placed in the corresponding position in the cell, the text box can be used to automatically wrap, but also can be placed anywhere in the advantages, including multiple columns can span, the disadvantage is because the content is not in the cell, if the data can not participate in the calculation.

Inserts a no border, no fill color, and just good with the need for the area of the text box, and then input in the text box, you can achieve the effect of automatic line wrapping, can meet our needs in some cases, but to adjust the good position, it is more trouble, and finally give a macro, A macro that inserts a text box of the same size as the selection area, with the following code:

Sub addtextboxinselection ()

'****************************************

' Function: Inserts a text box of the same size as the selection area

' Author: Bengdeng

Publish

' Time: 2009-02-20

'****************************************

Dim xSP as Shape

With Selection

Set xSP = ActiveSheet.Shapes.AddTextbox _

(1,. Left,. Top,. Width,. Height)

End With

With XSP

. Fill.Visible = MsoFalse

. Line.visible = MsoFalse

. Select

End With

End Sub

See the above several methods, if feel useless, or feel useful, then you do it yourself, practice it!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.