跳到主要内容

如何在不双击Excel的情况下键入或编辑单元格?

通常,在编辑带有内容的单元格时,您需要双击它才能首先进入编辑模式。 要编辑内容超出单元格大小的单元格,您需要进入编辑模式,然后找到进行更改的准确位置。 本教程介绍了三种方法,可以帮助您轻松地在Excel中编辑单元格。


键入或按F2键编辑单元格

你可以按下 F2 无需双击即可进入单元格的编辑模式。

它很容易操作,您只需选择要编辑的单元格并按F2键,光标将位于单元格值的末尾,那么您可以立即编辑该单元格。

备注:您需要按 F2 重复按键以编辑列表中的所有单元格。


在Excel中轻松查看和编辑内容较长的单元格:

增强的编辑栏 实用程序 Kutools for Excel 可以帮助您轻松查看和编辑内容较长的单元格,而无需双击该单元格或放大公式栏。
立即下载并试用! (30 天免费试用)


输入或使用VBA代码编辑单元格

如果按F2键也很耗时,则可以尝试以下VBA方法。

1。 按 其他 + F11 同时打开 Microsoft Visual Basic应用程序 窗口。

2.在 Microsoft Visual Basic应用程序 窗口,请双击左侧栏中的工作表名称(您需要在此工作表中编辑位置的单元格)以打开代码窗口。 然后将下面的VBA代码复制并粘贴到窗口中。

VBA代码:无需双击即可输入或编辑单元格

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Update by Extendoffice 20190809
    SendKeys "{F2}"
End Sub

3。 按 其他 + Q 同时关闭按键 Microsoft Visual Basic应用程序 窗口。

从现在开始,选择一个单元格或当按下回车键移动到下一个单元格在这个工作表中,它会进入编辑模式自动。


强大的功能可轻松编辑内容较长的单元格

在这里我们介绍 增强的编辑栏 的特点 Kutools for Excel。 使用此功能,您可以轻松编辑内容较长的单元格,而无需双击该单元格。

在进行以下操作之前,请 去下载并安装 Kutools for Excel 首先。

1.通过单击启用此功能 库工具 > 显示隐藏增强的编辑栏.

从现在开始,选择一个小区时,一个窗口会弹出来显示它的全部内容。

直接编辑窗口中的内容将同时对单元生效。

Tips::点击 库工具 > 增强的编辑栏 关闭该功能。

  如果您想免费试用(30天)此实用程序, 请点击下载,然后按照上述步骤进行操作。

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Pp nhập mã VBA: "Khác+F11", Khác là phím nào trên bàn phím ạ
This comment was minimized by the moderator on the site
Hi Nguyen Xuan Hoa,

There is no difference, you just need to select the appropriate keys on your keyboard. Or you can open the Microsoft Visual Basic for Applications window by clicking Developer > Visual Basic on the Excel ribbon.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/visual.png
This comment was minimized by the moderator on the site
Is there a way to have the go to the beginning of the cell when entering it rather than the end of the cell?
This comment was minimized by the moderator on the site
Hi,To display the cursor at the beginning of the selected cell, the following VBA code can help. Please have a try.<div data-tag="code">Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updated by Extendoffice 20211231
SendKeys "{F2}{HOME}"
End Sub
This comment was minimized by the moderator on the site
Great. Any way to set it up in VGA so that I can select a column or large column of data and just run it? - entering and exiting the cells until complete? Random request but I've been sent a data source and excel isn't detecting the dates in the cells until you have been in and out of the cell. I am a newbie, so any help is appreciated.
This comment was minimized by the moderator on the site
Hi Andy,
Sorry can't help you with that.
This comment was minimized by the moderator on the site
(grateful emoji)!   Thank you ma'am! (or a word that expresses the utmost respect in whatever gender you identify with) (red heart emoji)
This comment was minimized by the moderator on the site
This is very helpful! Is there a way to apply the sendkeys F2 to only 1 cell in the worksheet? I don't need every cell that I click to go into edit mode, I only need one to do it.
This comment was minimized by the moderator on the site
2 thumbs up
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations