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 Answer 1

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.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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