VBA ISERROR Function

HomeVBA Functions LIST (Category Wise)How to use the VBA ISERROR Function (Syntax + Example)

What is VBA ISERROR Function

how to use it

To use VBA's ISERROR function you need to understand its syntax and arguments:

Syntax

IsError(Expression)

Arguments

  • Expression: An expression that you want to test if it’s an error or not.

Example to use ISERROR Function in VBA

To practically understand how to use VBA ISERROR function, you need to go through the below example where we have written a vba code by using it:

Sub example_ISERROR()
Range("B1").Value = IsError(Range("A1"))
End Sub

In the above code, we have used ISERROR to check if the cell A1 has an error or not, as a result, it has returned TRUE as we have an #N/A error in the cell A1.

Related Functions


About the Author

puneet one point one

Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can find him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.