Hi all.
I am currently trying to loop through a worksheet and find all cells with ''ERR''
then generate a list of their locations in another spreadsheet.
I have been successful in generating the list next to the erroneous cells, but that is a test and it's really no good to me unless I can get the locations of the erroneous cells in a neat column in another sheet.
Would anyone be kind enough to assist?
Many thanks.
My current code below.
I am currently trying to loop through a worksheet and find all cells with ''ERR''
then generate a list of their locations in another spreadsheet.
I have been successful in generating the list next to the erroneous cells, but that is a test and it's really no good to me unless I can get the locations of the erroneous cells in a neat column in another sheet.
Would anyone be kind enough to assist?
Many thanks.
My current code below.
Code:
Sub FindError()
Dim sell As Range
Dim LastRow As Long
Dim Rng As Range
Application.ScreenUpdating = False
LastRow = Worksheets("Sheet1").Range("A65536").End(xlUp).Row
Set Rng = Worksheets("Sheet1").Range("A1:A" & LastRow)
For Each sell In Rng
If sell.Value = "ERR" Then
sell.Offset(0, 1).Value = sell.Address(False, False)
End If
Next sell
Range("A1").Select
Application.ScreenUpdating = True
End Sub