By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 1,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Maybe IIF, I don't know Round 2!!

Presto731
P: 53
I would prefer to do this with an IFF statement as it would be the easiest way for me to continue with the project.

Here is what I need. in a table will be a number. based on that number three values can arrise, we will call that number x and the threshold will be y and the resulting value will be z

Here are the three resulting values

if X is less than Y, then Z will equal a calculation based on a certain value
if X is equal to Y then Z equals 0
if X is greater than Y then Z equals 50

Please help put this together in my query.

Thanks ini advance
Apr 28 '08 #1
Share this Question
Share on Google+
3 Replies


Expert Mod 2.5K+
P: 2,545
Hi. Two IIFs nested will do what you require, replacing the placeholder {your calculation goes here} with your actual calculation:

IIF(X=Y, 0, IIF(X>Y, 50, {your calculation goes here}))

-Stewart
Apr 28 '08 #2

Presto731
P: 53
Hi. Two IIFs nested will do what you require, replacing the placeholder {your calculation goes here} with your actual calculation:

IIF(X=Y, 0, IIF(X>Y, 50, {your calculation goes here}))

-Stewart

that looks like what I was needing. Thank you i will try it
Apr 28 '08 #3

Presto731
P: 53
Thanks Stewart that was exactly what I needed!!!
Apr 29 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.