Roger H, not sure if you still need this answered or not... I'm not an 07 user but in theory this should find and list all formulas returning an error albeit not just ref's pnto a LOG sheet
So assuming you're active on Sheet1 and ran this code a new sheet "Sheet1_Invalid" would be created and in columns A,B & C you would see cell reference, formula & result causing errors -- C showing error type.
Assuming 07 remains like 03 for Edit / Find you could look for #REF, looking in Values -- and opt to Find All -- this would list the results but to my knowledge you could not copy & paste the results for review.Code:Sub form_errors() Dim s1 As String: s1 = ActiveSheet.Name Dim rng, cell As Range Set rng = Sheets(s1).UsedRange.SpecialCells(xlCellTypeFormulas, xlErrors) Application.DisplayAlerts = False Select Case rng Is Nothing Case False On Error Resume Next Sheets(s1 & "_Invalid").Delete On Error GoTo 0 Sheets.Add After:=Sheets(s1) ActiveSheet.Name = s1 & "_Invalid" Sheets(s1).Select For Each cell In rng Sheets(s1 & "_Invalid").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) = cell.Address Sheets(s1 & "_Invalid").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0) = Replace(cell.Formula, "=", "'") Sheets(s1 & "_Invalid").Cells(Rows.Count, 3).End(xlUp).Offset(1, 0) = cell.Value Next cell End Select Application.DisplayAlerts = True End Sub


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks