+ Reply to Thread
Results 1 to 1 of 1

Error tracking in excel workbook

  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    Ind
    MS-Off Ver
    Excel 2010
    Posts
    110

    Error tracking in excel workbook

    Hi,

    I need assistance on following code which I do have. Basically code is finding formula error values and showing to us in message box. What I want to do is after identifying formula errors it should add new workbook and in that workbook in column a it should put cell address after that in column b it should put sheet name, finally it should put file path of that workbook where code identified errors. Please see output file which I wanted after running code.

    Sub ErrorList()
    Dim ws As Worksheet
    Dim rng1 As Range
    Dim strOut As String
    Application.ScreenUpdating = False
    For Each ws In ActiveWorkbook.Sheets
    Set rng1 = Nothing
    On Error Resume Next
    Set rng1 = ws.Cells.SpecialCells(xlFormulas, xlErrors)
    On Error GoTo 0
    If Not rng1 Is Nothing Then strOut = strOut & (ws.Name & " has " & rng1.Cells.Count & " errors" & vbNewLine)
    Next ws
    If Len(strOut) > 0 Then
    MsgBox "Error List:" & vbNewLine & strOut

    Application.ScreenUpdating = True

    Else
    MsgBox "No Errors", vbInformation
    End If

    End Sub
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1