0
我正在嘗試在工作簿的每個工作表上執行一些簡單的計算。但是,計算不會在所有工作表上更新。您能否幫助我將計算結果顯示在工作簿的所有表格中?方程式不使用Excel VBA在工作簿中的所有工作表上更新
這是我到目前爲止有:
Sub SearchFolders()
'UpdatebySUPERtoolsforExcel2016
Dim xOut As Worksheet
Dim xWb As Workbook
Dim xWks As Worksheet
Dim xRow As Long
Dim xFound As Range
Dim xStrAddress As String
Dim xFileDialog As FileDialog
Dim xUpdate As Boolean
Dim xCount As Long
Application.ScreenUpdating = False
Set xWb = ActiveWorkbook
For Each xWks In xWb.Sheets
xRow = 1
With xWks
.Cells(xRow, 12) = "Meas-LO"
.Cells(xRow, 13) = "Meas-Hi"
.Cells(xRow, 14) = "Marginal"
LastRow = ActiveSheet.UsedRange.Rows.Count
Range("L2").Formula = "=G2+I2"
Range("L2").AutoFill Destination:=Range("L2:L" & LastRow)
Range("M2").Formula = "=I2-F2"
Range("M2").AutoFill Destination:=Range("M2:M" & LastRow)
End With
Application.ScreenUpdating = True 'turn it back on
Next xWks
End Sub
更新了我的問題......對不起,它只是VBA – Joe