LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Finding Cell Address of All Errors

Terrific, urkec; that's what I was looking for.

Thanks for your help.

Sprinks

"urkec" wrote:

Sub WriteErrors()

'writes error cells coordinates
'to a text file
'C:\sheetName_errors.txt

Set fso = CreateObject _
("Scripting.FileSystemObject")
Set f = fso.OpenTextFile _
("c:\" & ActiveSheet.Name _
& "_errors.txt", 2, True)

Count = 0
f.WriteLine "Errors in " _
& ActiveSheet.Name & " :"
f.WriteLine

For Each c In ActiveSheet. _
UsedRange.Cells

If IsError(c.Value) Then
Count = Count + 1
f.WriteLine "Cell (" & c.Row _
& ", " & c.Column & ")"
End If

Next

If Count = 0 Then
f.WriteLine "No errors in this sheet"
End If

f.Close

End Sub


--
urkec


"Sprinks" wrote:

We produce building cost estimates for architectural clients. We have a
quality control macro that checks and corrects pagination, adjusts column
widths, rezooms each page, and positions the cursor to cell A1 on each sheet,
and checks for #VALUE# and #REF# errors. The number of errors for each sheet
is written to an integer array and later displayed:

' Assign errors array
aintErrors(ActiveSheet.Index) = _
Application.Evaluate("SUM(--(ISERROR(" & ActiveSheet.UsedRange.Address &
")))")

Users are now requesting that the cell addresses of each error be obtained
to simplify tracking them down. Can anyone help me do this?

Thank you.

Sprinks



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Cell address by value default105 Excel Discussion (Misc queries) 2 June 30th 09 09:31 PM
Finding Cell address by value default105 Excel Discussion (Misc queries) 1 June 30th 09 11:05 AM
Finding the Address of a Cell tb Excel Worksheet Functions 5 December 13th 07 01:59 PM
finding the address of a specific cell? botha822[_5_] Excel Programming 4 August 9th 06 11:26 PM
Finding cell address... korcutt Excel Programming 2 November 7th 05 10:50 PM


All times are GMT +1. The time now is 06:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"