Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error check on sheet
Hello. Is there a way to simply scan Sheet1, and determine if any cells
equate to an error? I am taking data from a sheet and uploading it t an external system. I'd like to have the macro stop as soon as it finds an error anywhere in sheet1. Thanks so much. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error check on sheet
You could use conditional formatting.
Select all the cells and use a formula of =ISERROR(A1) and choose a colour. All errors are then flagged. -- HTH Bob Phillips "Steph" wrote in message ... Hello. Is there a way to simply scan Sheet1, and determine if any cells equate to an error? I am taking data from a sheet and uploading it t an external system. I'd like to have the macro stop as soon as it finds an error anywhere in sheet1. Thanks so much. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error check on sheet
Thanks Bob. But this is scheduled code that automatically runs. I was
hoping for a solution that determines if errors exist and then exits the sub. No user will see the conditional formatting of the errored cells. "Bob Phillips" wrote in message ... You could use conditional formatting. Select all the cells and use a formula of =ISERROR(A1) and choose a colour. All errors are then flagged. -- HTH Bob Phillips "Steph" wrote in message ... Hello. Is there a way to simply scan Sheet1, and determine if any cells equate to an error? I am taking data from a sheet and uploading it t an external system. I'd like to have the macro stop as soon as it finds an error anywhere in sheet1. Thanks so much. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error check on sheet
Steph,
You could try something like Dim rng As Range Set rng = ActiveSheet.UsedRange Debug.Print Evaluate("SUMPRODUCT(--(ISERROR(" & rng.Address & ")))") just take action if the result is greater than 0 -- HTH Bob Phillips "Steph" wrote in message ... Thanks Bob. But this is scheduled code that automatically runs. I was hoping for a solution that determines if errors exist and then exits the sub. No user will see the conditional formatting of the errored cells. "Bob Phillips" wrote in message ... You could use conditional formatting. Select all the cells and use a formula of =ISERROR(A1) and choose a colour. All errors are then flagged. -- HTH Bob Phillips "Steph" wrote in message ... Hello. Is there a way to simply scan Sheet1, and determine if any cells equate to an error? I am taking data from a sheet and uploading it t an external system. I'd like to have the macro stop as soon as it finds an error anywhere in sheet1. Thanks so much. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error check on sheet
Steph wrote: Hello. Is there a way to simply scan Sheet1, and determine if any cells equate to an error? I am taking data from a sheet and uploading it t an external system. I'd like to have the macro stop as soon as it finds an error anywhere in sheet1. Thanks so much. try this : Dim oError On Error Resume Next Set oError = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, xlErrors) If TypeName(oError) = "Empty" Then Debug.Print "No Error" Else Debug.Print "Error" End If Err.Clear |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error check on sheet
Dim oError
On Error Resume Next Set oError = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas, xlErrors) If TypeName(oError) = "Empty" Then Debug.Print "No Error" Else Debug.Print "Error" End If Err.Clear |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Runtime 9 error Check. | Excel Worksheet Functions | |||
Check Activesheet for chart sheet or work sheet | Charts and Charting in Excel | |||
Enable check box in protected sheet + group check boxes | Excel Discussion (Misc queries) | |||
Sum up columns in different sheet with error check | Excel Discussion (Misc queries) | |||
how to use sumif function to check date in 1 sheet is < 2 sheet | Excel Worksheet Functions |