SharePoint calculated column if contains text

In this SharePoint Online tutorial, I will explain the SharePoint calculated column if contains text. Then, I will show you, how to add text in the if statement from a SharePoint calculated column.

Here, you can see, I have a SharePoint Online list as “Issue Tracker,” inside this, I have added a calculated column (Product Name).

SharePoint calculated column if contains text

SharePoint calculated column if contains text

Let us discuss how to add a SharePoint calculated column if contains text. Here, if a user wants to add an issue based on the title, then the issue will appear under the Product Name. To achieve it, follow the below steps.

  • Open the SharePoint Online list where you want to add a calculated column if contained text. Then, click on the + Add column option and select See all column types. Then, click on the Next button like below.
SharePoint Online calculated column if contains text
  • Next, enter the Column name (Product Name) on the Create Column page. And select the Data Type (Calculated).
  • Then, enter the IF statement in the Formula box like below.
=IF(ISERROR(FIND("Laptop",Title)),IF(ISERROR(FIND("Mobile",Title)),IF(ISERROR(FIND("Outlook",Title)),"","Outlook"),"Mobile"),"Laptop")
  • And, by default, we get the data type returned from the Single line of text. Then, click on the Ok button.
How to add a SharePoint calculated column if contains text
  • Once the calculated column is added, now we will add some issues based on the title. Then, we will get the issue-related product name, as shown below.
How to add a SharePoint Online calculated column if contains text

Similarly, I will show you another example of the SharePoint calculated column if contains text. Here, I have a SharePoint list as “Expense Tracker,” and inside this, I have added a calculated column like (Budget). In this argument, if the text string is within budget, then it is true or if the text string is over budget, then it is false.

To do so, follow the below steps. Such as:

  • Open the SharePoint Online list, click on the + Add column, and select See all column types. Then, click on the Next button like below.
  • Next, enter the Column name (Budget) on the Create Column page. And select the Data Type (Calculated).
  • Then, enter the IF statement in the Formula box like below.
=IF(Amount<=1500,"With in budget","Over budget")
  • Also, we get by default, the data type returned from the Single line of text. Then, click on the Ok button.
How to create a SharePoint Online calculated column if contains text
  • Now, refer to the below image for how we will get a SharePoint calculated column if contains text.
Create a SharePoint Online calculated column if contains text

This is how to add a SharePoint calculated column if contains text.

SharePoint calculated column contains

I will explain how SharePoint calculated column checks whether a column contains a specific value or not. Here, I want to check whether a SharePoint calculated column contains a specific value or not using the IF function along with ISNUMBER, which is used to check whether the result is valid or not.

Let’s see how to use contains in SharePoint calculated column. To achieve it, follow the steps below.

  • Open a SharePoint Online list and click on the + Add column then select See all column types and click on Next. Inside the create column tab, enter the column name and choose The type of information this column is (Calculated (calculation based on other columns)
Contains in SharePoint calculated column
  • Then insert the formula under Additional Column settings by choosing column from Insert column and select The data type returned from this formula is then click on OK.

The formula used to contain in SharePoint Online calculated column is listed below.

=IF(ISNUMBER(FIND("SharePoint",Title)),"SharePoint","Not contain")
SharePoint calculated column contain
  • The screenshot below displays the SharePoint calculated column and the output.

This is how to use contain in SharePoint calculated column using IF and ISMUNBER functions.

Conclusion

This SharePoint Online tutorial taught us all about the SharePoint calculated column if contains text. And we covered how to add a SharePoint calculated column if contains text with different examples.

You may also like: