Handle null exception

chkamt is int variable in my excel sheet some value is empty how to handle this as I try to handle this in screenshot.Excel sheet also attach marked in green color.

Try this

1 Like

Integers are value types, so they can’t be null. The default value for integer is 0.

However, you need to make sure that the value in Column v is in fact an integer as expected. To do this change your if statement to be: IsNumeric(CheckAmt) AndAlso CheckAmt < 60

The order is important! I switched from an And to an AndAlso statement. This means it will check the first expression and if it is false it will not check the second expression.