Excel) 的 ErrorCheckingOptions. (InconsistentFormula 屬性
當設定為 True (預設值) 時,Microsoft Excel 將識別某區域中公式不一致的儲存格。 如果為 False 則停用不一致的公式檢查功能。 可讀寫的 Boolean。
語法
運算式。InconsistentFormula
表達 代表 ErrorCheckingOptions 物件的 變數。
註解
區域中一致的公式,必須位在含有不一致公式之儲存格的左右或上下,這樣 InconsistentFormula 屬性才能正確作用。
範例
在下列範例中,當使用者選取儲存格 B4 (包含不一致的公式) 時,即會出現 [自動校正選項] 按鈕。
Sub CheckFormula()
Application.ErrorCheckingOptions.InconsistentFormula = True
Range("A1:A3").Value = 1
Range("B1:B3").Value = 2
Range("C1:C3").Value = 3
Range("A4").Formula = "=SUM(A1:A3)" ' Consistent formula.
Range("B4").Formula = "=SUM(B1:B2)" ' Inconsistent formula.
Range("C4").Formula = "=SUM(C1:C3)" ' Consistent formula.
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。