我在刷新单元格的计算时遇到问题。

换句话说,我有很多列,其中每一列都有一个公式或宏。

但问题是我应该绝对激活excel选项中的“自动计算”选项,或者我应该保存然后新结果出现。

现在,我会在宏中插入一些可以立即刷新结果的内容。

谢谢

最佳答案

你可以简单地按:
F9 计算整个事件工作簿
Shift + F9 计算事件表

无论如何,以下是 .Calculate 的不同选项:

Sub Souma()

'Use this to calculate all the open workbooks
Application.Calculate

'Use this to calculate the whole sheet, called "Sheet1"
ThisWorkbook.Worksheets("Sheet1").Calculate


'Use this to calculate the cell A1 on the sheet called "Sheet1"
ThisWorkbook.Worksheets("Sheet1").Range("A1").Calculate
'Use this to calculate the range A1 to D10 on the sheet called "Sheet1"
ThisWorkbook.Worksheets("Sheet1").Range("A1:D10").Calculate
'Use this to calculate the column A on the sheet called "Sheet1"
ThisWorkbook.Worksheets("Sheet1").Columns(1).Calculate
'Use this to calculate the row 1 on the sheet called "Sheet1"
ThisWorkbook.Worksheets("Sheet1").Rows(1).Calculate

End Sub

关于vba - 如何在excel中即时刷新计算,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/31959317/

10-10 20:14