ShowAll Questionssorted byDate Posted
Jordan Torrey 23

# In my "IF" statement, I want my "false" value to do nothing in my formula.

Just getting more practice with formulas but have run into an obstacle. Hopefully I'm overthinking it, but I'm writing a throw away formula:

IF( AnnualRevenue >= 1000000, NumberOfEmployees, " ???  ")

The goal is to throw an error message telling the user if the "AnnualRevenue" is greater than or equal to one million, then the "NumberOfEmployees" field is mandatory, else do nothing. What value do I need to enter in the "false" field? I've tried using "null" however there needs to be an actual value. Is using an "IF" statement the wrong route to take for this goal?

Any assistance is more than welcome. Thanks in adnvacned!!
Best Answer chosen by Jordan Torrey 23
Kim
Hi Jordan,

Are you writing a formula field? If you write a Validation rule, all you need is the the formula below, and add the message you want in the Error Message section. If the record meets the criteria below, it should throw the error that they need to fill out the NumberofEmployees field.
```AND(
AnnualRevenue >= '1000000',
ISBLANK(NumberOfEmployees)
)```

Kim
Hi Jordan,

Are you writing a formula field? If you write a Validation rule, all you need is the the formula below, and add the message you want in the Error Message section. If the record meets the criteria below, it should throw the error that they need to fill out the NumberofEmployees field.
```AND(
AnnualRevenue >= '1000000',
ISBLANK(NumberOfEmployees)
)```

This was selected as the best answer
Jordan Torrey 23
Hi Kim,
Yes apologies; I missspoke. Thank you for providing this formula. One of my attempts was close to this but looked more like:

IF(ISBLANK(AnnualRevenue) >= 100000, NumberofEmployees, ???)

But for obvious reasons failed. Your formula worked like a charm. Thank you for your assistance Kim!
```<apex:repeat value="{! Comments}" var="Com">