IF Then Else statements in Field Calculator

2673
1
Jump to solution
12-02-2014 11:58 PM
StephenConner
New Contributor

I have been going through the forum and trying everything.  Maybe someone here can see where i have gone wrong.

 

I amd calculating the percent change and have come across only one of my properties with no value, which gives me the error of dividing by zero.  So I am using if then else statements to avoid it.  Here is the Pre-logic:

 

Dim Per1314

If [LVal2013] = 0 Then
Per1314 = 0
Else
Per1314 = [Diff1314] / [LVal2013]*100
End If

 

Where am I going wrong?   FYI: Arcgis 10.2.2

0 Kudos
1 Solution

Accepted Solutions
Pieter_Geertvan_den_Beukel
Esri Contributor

an empty value is different from a 0 (zero).

Try:

If [LVal2013] is null Then

View solution in original post

0 Kudos
1 Reply
Pieter_Geertvan_den_Beukel
Esri Contributor

an empty value is different from a 0 (zero).

Try:

If [LVal2013] is null Then

0 Kudos