I've written a macro to remove the annoying error flags (with a green triangle in the corner and an exclamation point with a drop-down when you enter the cell) in Excel spreadsheets that have a different formula for adjacent cells:
My question is, is there a way to determine the actual number of errors in the cell? Eight seems to be the magic number
Code:
Sub subIgnoreErrors(Optional ws As Worksheet)
Dim cell As Range
Dim intLoop As Integer
Dim strEndCell as String
On Error Resume Next
If ws Is Nothing Then Set ws = ActiveSheet
strEndCell = ws.Range("A1").SpecialCells(xlCellTypeLastCell).Address
For Each cell In ws.Range("$A$1:" & strEndCell)
For intLoop = 1 To 8
cell.Errors.Item(intLoop).Ignore = True
Next
Next
End Sub
Comment