Run a formula that is dependent on whether the number field is positive or negative

I feel like this is possible, but I’m not 100% sure. I know I can run a formula that says do “X” if the value is “Y” and otherwise do “Z”, but can that be done on whether the number is negative or positive?

This is what I’m trying to do - I have a number field that captures the number of days before (negative) or after as listed in a contract. I need to calculate a date based on those numbers, but the date I calculate from depends on whether it is listed as before or after in a contract. So for example, if in the contract it says the survey is due 30 days before the end of feasibility, I need to use the feasibility date field based on that -30. If it says it is due 60 days after the effective date, I need to use the effective date field based on that 60.

Hopefully this makes sense.

Thank you!

What happens if the number is zero? If that number gets lumped in with either the positive or negative group, you could do something like this:

IF( {Number} >= 0, do this positive or zero stuff, do this negative stuff)

Otherwise, you can nest IF blocks inside of each other:

    {Number} > 0, do this positive stuff,
    IF( {Number} < 0, do this negative stuff,
        do this zero stuff
1 Like

This worked beautifully. Thank you!

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.