checking errors in the formulas

  • Thread starter Thread starter cawemann
  • Start date Start date
C

cawemann

i must write a macro that checks errors in formulas and returns
message box saying which cell the error occured on. also it must bee
when the message box opens up. i really need help.:
 
Try something like

Dim ErrCells As Range
Dim Rng As Range
On Error Resume Next
Set ErrCells = ActiveSheet.UsedRange.SpecialCells( _
xlCellTypeFormulas, xlErrors)
On Error GoTo 0
If Not ErrCells Is Nothing Then
For Each Rng In ErrCells
Rng.Select
Beep
MsgBox "Error in cell: " & Rng.Address
Next Rng
End If



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top