function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Slide6Slide6 

IF Formula issue

Hello out there, I need help in creating an IF formula that will allow me to tie new custom field called "Forecast Category Rating" to the Probability stage. Our probability stages are 25%, 50%, 75% and 90%. I'd like the Forecast Category Rating to correspond to the Probability percentages e.g. if probability >= 25% the Forecast Category Rating = D (C for 50%, B for 75% and A for 90%).

I tried this formula and get a syntax error missing ')'..Any ideas? Thanks in advance to all. My email address is dennis.dipietro@acsacs.com.

IF (Probability  >= 25, "D", IF (Probability  >= 50, "C", IF (Probability  >= 75, "B", IF (Probability >= 90, "A"))


Message Edited by Slide6 on 07-28-2008 02:27 PM
NPMNPM

With this syntax error, one thing to look for is having the same number of closed parentheses as you have open parentheses.  It looks like you may need about 3 more closed parentheses (It is hard to tell with the smiley face) .  Work with that first to get past your syntax errors and post a question if the formula does not do what you expect.

 

Kent ManningKent Manning
Hi, I see where your problems is with your IF statement. You have four nested IF statements that all have to be terminated with a ')'. 

So the formula needs to be:

IF (Probability  >= 25, "D", IF (Probability  >= 50, "C", IF (Probability  >= 75, "B", IF (Probability >= 90, "A",null))))

IF statements have the following syntax:  IF( a condition to evaluate, value-if-true, value-if-false).  So the last IF statement -   IF(Probability >= 90, "A") - is missing the condition you want to set if the probability >= 90 is false.  You will need to put something there so that the statemtent will return a value if everything fails. 

The other item you might consider is reversing the order of your values. Otherwise, the first if statement is evaluated to true for any probability value greater than 25. The rest of the IF statements will not be checked and you will alway receive a value of "D" for any probability greater than 25.

So I would rewrite it like this:

    IF (Probability  >= 90, "A", IF (Probability  >= 75, "B", IF (Probability  >= 50, "C", IF (Probability >= 25, "D",null))))

Hope that helps...




ILX_MJILX_MJ

We do a similar formula, works exactly the same way, here it is...

IF( Probability <0.30, "No Shot",
IF( Probability <0.50, "Long Shot",
IF( Probability <0.70, "High Prob",
IF( Probability <0.80, "Expected",
IF( Probability <100, "Confirmed",
IF( Probability =100, "Closed",
"Other"))))))

Hope that helps.