ERROR: Invalid Type in Operator <
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
pfa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I feel like an idiot. Staring me right in the face. Thank you so much @TheOC !!!!!
