1

I am new to SharePoint.

I am looking for a way to assign a value for a column depending on another column's value. For example, the choice column dictates "New York" the value of the calculated column would display "Person1," and there are also more choices like "Florida" and the column should write "Person2".

What is the exact formula for this?

Thanks!

1

Try using below formula:

=IF([ChoiceField]="New York","Person1",IF([ChoiceField]="Florida","Person2",[ChoiceField]))

This formula is similar to:

if(ChoiceField === "New York") {
    CalculatedValue = "Person1";
} else if(ChoiceField === "Florida") {
    CalculatedValue = "Person2";
} else {
    CalculatedValue = ChoiceField;
}

IF Function:

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. Use IF to conduct conditional tests on values and formulas.

Syntax:

IF(logical_test,value_if_true,value_if_false)

Remarks:

Up to seven IF functions can be nested as value_if_true and value_if_false arguments to construct more elaborate tests.

Reference:

IF function.

  • it worked! thanks for a speedy reply :) – John Ledesma Jul 19 at 8:01
  • Welcome. Happy SharePointing :D – Ganesh Sanap Jul 19 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.