excel怎么添加换行符_在Excel公式中添加换行符

excel怎么添加换行符

在Excel公式中添加换行符 (Add Line Break in Excel Formula)

Add Line Break in Excel Formula

It's easy to add a line break when you're typing in an Excel worksheet. Just click where you want the line break, and press Alt + Enter. But how can you add line break in Excel formula?

在Excel工作表中键入时,很容易添加换行符 。 只需单击要换行的位置,然后按Alt + Enter。 但是如何在Excel公式中添加换行符?

Excel文本中的换行符 (Line Break in Excel Text)

Here is an example of adding a line break in Excel text.

这是在Excel文本中添加换行符的示例。

  • The cursor is positioned where the line break should be added.

    光标位于应添加换行符的位置。
  • Press Alt+Enter

    按Alt + Enter
  • Press Enter, to complete the entry and move to another cell

    按Enter键,完成输入并移至另一个单元格

linebreak01

自动换行 (Wrap Text Added Automatically)

When you press the Enter key to complete the entry, the line break appears, and Wrap Text is automatically added to the cell.

当您按Enter键完成输入时,将出现换行符,并且自动将换行文本添加到单元格中。

You might have to adjust the column width though, because the text won't flow into the next column.

但是您可能必须调整列宽,因为文本不会流入下一列。

linebreak02

在公式中添加换行符 (Add a Line Break in a Formula)

It's not quite as easy to add a line break in a formula, but it's possible! Here is a formula that shows text, combined with the sum of the values in C1:C6

在公式中添加换行符不是那么容易,但是有可能! 这是一个显示文本的公式,结合了C1:C6中的值之和

="Total amount is: " & SUM(C1:C6)

=“总金额为:”&SUM(C1:C6)

Add Line Break in Excel Formula

To add a line break between the text and the total amount, use the Excel CHAR function, with the number 10. The "&" operator is included too,  to join the line break character to the other text in the formula.

要在文本和总数之间添加一个换行符,请使用Excel CHAR函数 (数字为10)。还包括“&”运算符,用于将换行符与公式中的其他文本结合在一起。

="Total amount is: " & CHAR(10) & SUM(C1:C6)

=“总金额为:” &CHAR(10) &SUM(C1:C6)

linebreak04

启用自动换行 (Turn on Wrap Text)

After you add the line break, and press Enter, you might see a strange little box, where the line break should be.

添加换行符后,按Enter键,您可能会看到一个奇怪的小框,该行应位于此位置。

linebreak05

The Wrap Text feature isn't automatically turned on, when you add a line break in a formula. You'll have to turn it on yourself.

在公式中添加换行符后,自动换行功能不会自动打开。 您必须自己打开它。

Select the cell with the line break in the formula, and on the Ribbon's Home tab, click the Wrap Text command.

选择公式中带有换行符的单元格,然后在“功能区”的“主页”选项卡上,单击“自动换行”命令。

Then, you'll see the line break in the cell, instead of the little square.

然后,您将看到单元格中的换行符,而不是小方块。

翻译自: https://contexturesblog.com/archives/2011/08/08/add-line-break-in-excel-formula/

excel怎么添加换行符

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值