VBA to Ignore All Errors

peterhinton

Active Member
Joined
Mar 8, 2016
Messages
336
does anyone have any VBA to ignore all errors on a sheet ?

I am aware you can select a whole range of cells to remove a load of errors at once, but it can only remove one type of error at a time I think,

I just want a macro I can run that will ignore any errors in one go,
don't want to turn off any of the options either,

any suggestions welcome, thanks.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Code:
Sub t()
On Error Resume Next
'other code here
On Error GoTo 0
End Sub

It ignores the errors but may not give desired results.
 
Upvote 0
Thanks for effort, but didn't do anything for me,

I have a sheet with a lot of numbers stored as text, and a lot of sums with adjacent numbers,

and a million little blue triangles showing me there is an error! lol

they don't actually affect anything, they just annoy the **** out of me, but I still need all the error checking on as other sheets will use it.
 
Upvote 0
you can access the settings in file>options>formulas> and then rule settings

I want to keep my rule settings, but have a macro that will just ignore errors for me to save me having to highlight a load of cells and manually doing it.
 
Upvote 0
Hi,
not sure if this is what you are looking for but try inserting this line in your code:

Code:
Application.ErrorCheckingOptions.BackgroundChecking = False

set back to True when required.

Dave
 
Upvote 0
does anyone have any VBA to ignore all errors on a sheet ?

I am aware you can select a whole range of cells to remove a load of errors at once, but it can only remove one type of error at a time I think,

can you not remove errors by

Code:
dim addr as string
Let addr = "A1:Z" & Range("A" & Rows.Count).End(xlup).Row
Range(addr) = Evaluate("IF(ISERROR(" & addr & "),""""," & addr & ")")
 
Upvote 0
Hi,
not sure if this is what you are looking for but try inserting this line in your code:

Code:
Application.ErrorCheckingOptions.BackgroundChecking = False

set back to True when required.

Dave

This is exactly what I was after !

Thanks Dude
 
Upvote 0

Forum statistics

Threads
1,213,554
Messages
6,114,280
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top