在Excel中查找换行符

在Excel中查找换行符 (Find Line Breaks in Excel)
Line breaks are easy to add, but a little trickier to remove.

换行符很容易添加,但删除起来有点棘手。

To find specific text in Excel, you can use Ctrl + F to open the Find and Replace dialog box. However, if you try to type Alt + Enter in the Find What box, you’ll just hear a beep from your computer. Excel won’t let you put that shortcut into the Find What box.

要在Excel中查找特定文本,可以使用Ctrl + F打开“查找和替换”对话框。 但是,如果您尝试在“查找内容”框中键入Alt + Enter,则只会听到计算机发出蜂鸣声。 Excel不允许您将快捷方式放入“查找内容”框中。

Instead of using Alt + Enter, you can use a special shortcut to enter a line break in the Find What box: Ctrl + J 

代替使用Alt + Enter,可以使用特殊的快捷方式在“查找内容”框中输入换行符: Ctrl + J

Why does that work? A line break is character 10 in the ASCII character set, and the Ctrl + J shortcut is the ASCII control code for character 10.

为什么行得通? 换行符是ASCII字符集中的字符10,而Ctrl + J快捷键是字符10的ASCII控制代码 。

查找并替换换行符 (Find and Replace a Line Break)
To find a line break, and replace it with a space character, follow these steps. There is a video below, that shows the steps.

若要找到一个换行符,并将其替换为空格字符,请按照下列步骤操作。 下面有一个视频,显示了步骤。

Select the cells that you want to search
选择您要搜索的单元格
On the keyboard, press Ctrl + H to open the Find and Replace dialog box, with the Replace tab active
在键盘上,按Ctrl + H以打开“查找和替换”对话框,其中“替换”选项卡处于活动状态
Click in the Find What box
单击查找内容框
On the keyboard, press Ctrl + J to enter the line break character -- NOTE: No text will appear in the Find What box -- just a small blinking dot

在键盘上,按Ctrl + J键输入换行符-注意:“查找内容”框中将不会显示任何文本-只是一个小的闪烁点

Press the Tab key on the keyboard, to move to the Replace With box
按键盘上的Tab键,移至“替换为”框
Type a space character
输入空格
Then, click Find Next or Find All, to find the cells with line breaks.
然后,单击“查找下一个”或“查找所有”,以查找带有换行符的单元格。
OR, click Replace or Replace All, to replace the line breaks with space characters.
或者,单击“替换”或“全部替换”,以换行符替换为空格字符。
NOTE: If these steps don't work, try the tips and troubleshooting suggestions below.

注意 :如果这些步骤不起作用,请尝试以下提示和故障排除建议。

Get more Excel data entry tips on my Contextures website.

在我的Contextures网站上获取更多Excel数据输入提示 。

提示和故障排除 (Tips and Troubleshooting)
Update: Here are a few tips and troubleshooting suggestions, to use while you find and replace line breaks in Excel. Thank you to everyone who commented, and added suggestions.

更新 :以下是一些技巧和故障排除建议,可在您查找和替换Excel中的换行符时使用。 感谢所有发表评论并提出建议的人。

If Ctrl + J does not work, press the Alt key, and type 0010 on the number keypad (do not use the numbers above the letters)

如果Ctrl + J不起作用,请按Alt键,然后在数字键盘上键入0010 (请勿使用字母上方的数字)

If the Excel file has never been saved, try saving the file before doing this find and replace
如果从未保存过Excel文件,请在执行此查找和替换操作之前尝试保存文件
Try doing this find and replace when you first open Excel, before using the Find box for any other searches. Or, try the next tip -- you might have extra line breaks in the Find box.

首次打开Excel时 ,请尝试执行此查找和替换操作,然后将“查找”框用于任何其他搜索。 或者,尝试下一条技巧-“查找”框中可能会有额外的换行符。

Click on the Replace tab -- you'll see a light border around the word.
单击“替换”选项卡-单词周围会出现一个浅边框。
Press the Tab key -- that will select the Find What box, and anything that is entered there.
按Tab键-将选择“查找内容”框以及在此输入的所有内容。
Type Ctrl+J (that will replace anything that you previously typed in Find)
键入Ctrl + J(它将替换您先前在“查找”中键入的任何内容)

视频:查找和替换换行符 (Video: Find and Replace Line Breaks)
Watch this short video, to see the steps for adding a line break in a cell. Then see how to find the line breaks in Excel, and replace them with space characters.

观看此简短视频,以了解在单元格中添加换行符的步骤。 然后查看如何在Excel中找到换行符,并用空格字符替换它们。

  • 4
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值