强制刷新“最后"工作表的单元格 [英] Force Refresh of "Last" Cell of the Worksheet

查看:91
本文介绍了强制刷新“最后"工作表的单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Excel中按 Ctrl + End 可以将您带到工作表的最右下角的单元格.

Pressing Ctrl+End in Excel takes you to the bottom-right-most cell of the worksheet.

如果删除最后一行或最后一列并保存工作簿,则最后一个单元格以及滚动条将被更新.

If you delete the last rows or columns and save the workbook, this last cell gets updated, as well as the scrollbars.

我记得您可以运行一条单行的VBA命令,而不必保存工作簿即可执行更新,但是我不记得该命令是什么-您有什么主意吗?

I remember there was a one line VBA command that you could run that would do the update without having to save the workbook, but I can't remember what the command is - do you have any ideas?

推荐答案

我发现了一些可以删除空白行的方法.您可以判断excel使用的已用范围"何时过大,并在使用右侧的滚动条时会添加多余的空白行,而在滚动到底部时它超出了实际数据的最后一行.当表导入到SQL中时,这将导致将多余的空白记录添加到表中.

I’ve found something that consistently works to delete those blank rows. You can tell when the "used range" excel is using is too big and is going to add extra blank rows when you use the scroll bar to the right and it goes beyond the last row of actual data when you scroll to the bottom. This will caused extra blank records to be added to the table when it is imported into SQL.

要摆脱它们:

  1. 选择最后一行数据下的整个第一行.按下 Ctrl + Shift + 向下箭头选择所有空白行.
  2. 从主页"选项卡中选择清除",然后从编辑"菜单中选择全部清除"(白色灰色橡皮擦的图片).
  3. 右键单击并选择删除".
  4. 首先转到单元格A1,然后保存.
  5. Ctrl + Home ,然后按 Ctrl + End (这样可以正确显示最后一个单元格使用的范围(空白行上方).
  6. 再次单击保存".
  1. Select the entire first row under the last row of data. Hit Ctrl + Shift + Down Arrow to select all the blank rows.
  2. From the Home Tab Select Clear and then Clear All from the Edit menu (picture of a whitish-grey eraser).
  3. Right-click and select Delete.
  4. Goto cell A1 first and then Save.
  5. Press Ctrl + Home and then Ctrl + End (This should take you the correct last cell in the used range (above blank rows).
  6. Click Save again.

这篇关于强制刷新“最后"工作表的单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆