Help

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

Topic Labels: Formulas
Solved
Jump to Solution
1228 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Kristina_Beever
6 - Interface Innovator
6 - Interface Innovator

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!

1 Solution

Accepted Solutions
Zollie
10 - Mercury
10 - Mercury

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:

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

See Solution in Thread

2 Replies 2
Zollie
10 - Mercury
10 - Mercury

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:

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

This worked beautifully. Thank you!