7 Replies Latest reply on Feb 17, 2015 9:39 AM by Matt Lutton

# Calculated Field - 'Between'

I am trying to create a calculated field where if number is greater than 17.5 then = "gold standard" which i have got to work... but then I also want if >5 but <17.5 (so between 5 and 17.5) = "Minimum standard".

But no matter what I try I cannot get the calculation to work.

Thanks in advance for any help.

• ###### 1. Re: Calculated Field - 'Between'

I assume it is something like this you want to do:

IF [Field] > 17.5 THEN "Gold standard"

ELSEIF [Field] >= 5 THEN "Minimum standard"

ELSE "Other"

END

• ###### 2. Re: Calculated Field - 'Between'

Hello, i have tried the above solution as well but it doesn't work for me either.

• ###### 4. Re: Calculated Field - 'Between'

IF [Field] > 17.5 THEN "Gold standard"

ELSEIF [Field] >= 5  AND [Field] <= 17.5  THEN  "Minimum standard"

ELSE "Other"

END

• ###### 5. Re: Calculated Field - 'Between'

David Walp wrote:

IF [Field] > 17.5 THEN "Gold standard"

ELSEIF [Field] >= 5  AND [Field] <= 17.5  THEN  "Minimum standard"

ELSE "Other"

END

That would return the same results as:

IF [Field] > 17.5 THEN "Gold standard"

ELSEIF [Field] >= 5 THEN "Minimum standard"

ELSE "Other"

END

Because the first IF statement sets the criteria for anything greater than 17.5, the ELSEIF  statement automatically sets the condition for being less than or equal to 17.5.  In other words, a value will HAVE to be less than or equal to 17.5 if it is NOT greater than 17.5.

Hopefully, that makes some sense.  If not, I can try to explain in another way -- its sometimes hard for me to put these concepts into words.

I'm guessing the underlying issue here will be much easier to figure out once we see some sample data in a packaged workbook (TWBX)

1 of 1 people found this helpful
• ###### 6. Re: Calculated Field - 'Between'

Of course.  Too much snow-shovelling today.

Thanks for setting me straight.

• ###### 7. Re: Calculated Field - 'Between'

No worries -- without a sample TWBX, we're all just making guesses anyway!