VBA – Make a list of the formula errors in an Excel

Errors in Excel are different – from “Division by Zero” (#Div/0) and #Name to #REF! and #Num.  There are lots of ways to summarize these into some kind of report and in the current article I will show the VBA way how to do it.

First, in order to have the same results, we should be getting the same errors. The code below generates 12 errors on every worksheet of the workbook, with some offset, thus the errors are on different cells:

If you want to have a summary of the type of errors per worksheet, this is what is quite easily possible with VBA:

For the details, the picture in the immediate window is a bit different:

The VBA for the summary looks like this:

And the VBA for the details is this one:

Cheers! 🙂

Tagged with: , , , , , ,