# In a Case function I would like a number between two numbers to return a result.

• 0
• Question
• Updated 4 years ago
I am trying to create a label for employees based on how long they've been with the company. I've created a working If formula that calculates under and over 90 days with the company based on the start date. I would like more than two results and can't figure out a working Case formula for under 90 days, 90-364 days, 365-729 days, etc. What notation do I need to return a result if the number of days falls between one of my windows?

If(ToDays(Today() - [Start Date])<90,"noob",ToDays(Today() - [Start Date])>90,"Not a noob")
• 0 Points

Posted 4 years ago

• 0
• 72,448 Points
Try this

var number Numdays = ToDays(Today() - [Start Date]);

IF(

\$NumDays <90, "shiny new",

\$NumDays <180, "green",

\$NumDays <360, "settling in", '"old hand')

• 0 Points
The syntax error begins at old hand. I tried removing what looked like extra apostrophe but still no luck.
• 0 Points
Never mind. There was also an apostrophe at the end of "old hand". Changed it to a quote and it works now. As always, thank you, Mark!