1

I am very new to the whole SharePoint and excel formulas and I am in the process of learning.

I have a list in SharePoint in which I have multiple columns.

I want to create a calculated column based on the value provided in the other column.

My first column "Input Data" with multiple choice as Strings. "String1", "String2", "String3" My second column "value" is a numeric column.

If I choose "String1", in the "Input Data" column then in the "value" column, I want a value 1 if I choose "String2", in the "Input Data" column then in the "value" column, I want a value 3 if I choose "String3", in the "Input Data" column then in the "value" column, I want a value 6

How do I write this?

I was initially trying to do it with one value

=if(([inputData])=="string1", 1,0)

but does not work.

1 Answer 1

1

If inputData is of type "Choice", use below formula:

=IF([inputData] = "String1", 1, 0)

If above formula throws "syntax error", use below:

=IF([inputData] = "String1"; 1; 0)

For multiple conditions, you can write nested IF conditions like:

=IF([inputData] = "String1", 1, IF([inputData] = "String2", 3, IF([inputData] = "String3", 6, 0)))

Documentation: Calculated Field Formulas

Note: Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).

1
  • 1
    Thank you for the reply. I also did use the above syntax. But I get technical error. Apparently, I have to use German formula and syntax due to the region. Sep 7, 2021 at 8:12

Your Answer

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

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