AnsweredAssumed Answered

Needing Help W/ Field cal and VB Script

Question asked by cjgoodma on Jul 17, 2018
Latest reply on Jul 17, 2018 by cjgoodma

I am trying to create a field calculation in a field to only display a range of numbers, using vb script and the pre-logic script code block. This is what I have so far


Dim x
if [Round_UPFT] <=1 then x = '0-1'

elseif [Round_UPFT] >=2 and [Round_UPFT] <=4 then x = '2-4'

elseif [Round_UPFT] >=5 and [Round_UPFT] <=20 then x = '5-20'

elseif [Round_UPFT] >=21 and [Round_UPFT] <=40 then x = '21-40'
end if



Ranges= x


i get a general error code too : 999999 

and a syntax error as well. 


I'm under the assumption that the AND function is messing the syntax up, but im such a newbie at this I dunno!