Forum Discussion
Calculated Columns with if and choice
To achieve the desired functionality in a calculated column in SharePoint or Microsoft Lists, you can use the following formula:
=IF( [ChoiceColumn] = "Choice1", [DateColumn] + 150, [DateColumn] + 90 )
Here's a breakdown of the formula:
- IF: This function allows you to evaluate a condition and return one value if the condition is true, and another value if the condition is false.
- [ChoiceColumn] = "Choice1": This condition checks if the value in the [ChoiceColumn] column is equal to "Choice1".
- [DateColumn] + 150: If the condition is true (i.e., if [ChoiceColumn] equals "Choice1"), this part of the formula adds 150 days to the value in [DateColumn].
- [DateColumn] + 90: If the condition is false (i.e., if [ChoiceColumn] does not equal "Choice1"), this part of the formula adds 90 days to the value in [DateColumn].
Make sure to replace [ChoiceColumn] and [DateColumn] with the actual internal names of your choice column and date column, respectively. Also, ensure that the choices in your choice column match exactly what you've specified in the formula (e.g., "Choice1").
Once you enter this formula into the calculated column formula field, SharePoint or Microsoft Lists will automatically calculate the dates based on the conditions specified. The text was created with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.