The solution in VB for the base process is @ "If then" VB Script code (or Python) equivalent to SQL's IN ('x','y',z') expression in ArcGIS Field Calculator question? works great but I was trying to nest 'if' statements and can't.
So pre-logic code of
if [grid_code] = 1 then f2= 2 end if if [grid_code] = 2 then f2=3.5 end if
...etc. but this doesn't work? what am I doing wrong?
I tried the second 'if' before the 'end if' and also tried 'elif' but these give script errors.
Also any idea why I get a warning message about "The calculated value is invalid for the row with objectID=1" and when you click click 'yes' to continue it works fine? Can I suppress this?