I am creating a new column via the Formula Tool and adding the IF Then Statement Below.
If [Case Size]<'10' Then '9 & Under'
ElseIf [Case Size]>='10' and [Case Size]<'100' Then '10-99'
ElseIf [Case Size]<'200' Then '100-199'
Else '200 +'
EndIF
When I add the "ENDIF" condition at the end, I get an error stating the "<" in the "ElseIF[Case Size]<'200' Then '100-199' is an "Invalid Type in Operator <."
Any idea as to what I am doing wrong? It seemed pretty straight forward. The Data Type for [Case Size] is INT32.
Solved! Go to Solution.
hey @RCern
you are stating the numbers as a string, for instance '10'. Any text or numeric within apostrophes or speech marks (' ") are defined as strings.
To fix your formula, remove your apostrophes from your conditions. I believe this should work:
If [Case Size]<10 Then '9 & Under'
ElseIf [Case Size]>=10 and [Case Size]<100 Then '10-99'
ElseIf [Case Size]<200 Then '100-199'
Else '200 +'
EndIF
If [Case Size]<10 Then '9 & Under'
ElseIf [Case Size]>=10 and [Case Size]<100 Then '10-99'
ElseIf [Case Size]<200 Then '100-199'
Else '200 +'
EndIF
pfa
I feel like an idiot. Staring me right in the face. Thank you so much @TheOC !!!!!