is there a function that does this?

G

Guest

Is there a function that, when given a parameter returns 0 if the parameter
is negative and returns the parameter when it is positive? Here is the
scenario in which I would use such a function. I have a school database that
tracks how many credits one needs in each department. When a student has,
say, 3 credits in english where 5 are required, I could simply subtract
credits earned from credits needed. Unfortunately, when a student has, say,
5.5 credits in english, that formula returns -.5 credits. What I would like
is for it to return 0 credits needed since they have met (or exceeded) the
credit reqirements for english.

Thanks,
Adam

P.S. I have found a suitable workaround in: ([param] + abs([param]))/2
I was just wondering if there is a more elegant solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top