'###############################################################
'函数作用:选取当前工作表中公式出错的单元格﹐关返回出错个数
'###############################################################
Public Function FormulaErrors() As Long
If MsgBox("Do you want select cells with an error in their formula ?", _
vbQuestion + vbOKCancel, AT) = vbCancel Then Exit Function On Error GoTo Er:
Cells.SpecialCells(xlCellTypeFormulas, 16).Select
MsgBox "Cells with an error are selected.", vbInformation, "Formula"
FormulaErrors = Selection.Count
Exit Function Er:
MsgBox "There are no cells with an error on this sheet.", vbInformation, "Formula"
FormulaErrors = 0
End Function
联系客服