In this tutorial, I will show you two examples of “SharePoint calculated column compare”. I will show how to use the SharePoint calculated column to compare two columns and display the result using IF function.
I have taken an example where you will find out whether the product I sell gives me profit or loss using the IF function in SharePoint calculated column.
Also, I will show you two examples related to “SharePoint calculated column equals another column”.
SharePoint calculated column compare using IF function
Let’s see how to compare SharePoint Online calculated column using the IF function. To achieve it, follow the below steps.
- 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)

- 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 compare SharePoint Online calculated column is listed below.
=IF(AND([Selling Price]<[Cost Price],[Cost Price]>=[Selling Price]),"Loss","Profit")

- Now, the SharePoint Online calculated column is created and shows the output as shown below.

This is how to compare SharePoint Online calculated column using the IF function.
Compare SharePoint Online calculated column using the Nested IF function
Let’s find out how to compare SharePoint Online calculated column using the Nested IF function. To do that, follow the below steps.
Here, in my SharePoint Online list, I want to set the status column based on the difficulty level column in SharePoint calculated column.
Go to the Create column tab using the steps of the previous section enter the column name and choose The type of information this column is (Calculated (calculation based on other columns)
- 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 as shown below.
The formula used in this section is listed below:
=IF([Difficulty level]<=5,"Low",IF(AND([Difficulty level]>=4, [Difficulty level]<=6),"Low Med",IF(AND([Difficulty level]>=7,[Difficulty level]<=8),"Medium",IF(AND([Difficulty level]>=9, [Difficulty level]<=11),"Med Hi",IF([Difficulty level]>=12,"High","")))))

- The below screenshot displays the SharePoint calculated column and the output of comparing the SharePoint Online calculated column.

This is how to compare SharePoint Online calculated column using the Nested IF function.
SharePoint calculated column equals another column
Let’s see how to implement SharePoint Online calculated column equals another column. To achieve it, follow the below steps.
- Open a SharePoint Online List, click on the +Add column, and then select See all column types -> Click on Next.

- Inside this Create column tab, enter the Column name and then select The type of information in this column is. Then, under the Additional Column settings insert the formula by selecting columns from the Insert column as shown below.

- Now, select The data type returned from this formula is and then click on the OK button. Then you can see the output of SharePoint Online calculated equals another column as shown below.

This is how to implement a SharePoint Online calculated column equals another column.
SharePoint calculated column equals another column using the IF condition
I will show you how SharePoint calculated column equals another column using the IF condition. To do that, follow the below steps.
- Go to Create column tab using the above section steps, then enter the Column name and select The type of information in this column is. Then insert the formula by selecting the column from the Insert column.
The formula used in SharePoint calculated is listed below:
=If(Title="Policy Document","HR",If(Title="Shipping Policy","Sales",If(Title="Terms & Conditions","HR","")))

- Then click on the OK button and now you can see the below screenshot shows the output of the SharePoint calculated column equals another column using the IF condition.

This is how SharePoint calculated column equals another column using the IF condition is implemented.
Conclusion
In this SharePoint tutorial, I have explained to you how to use SharePoint calculated column compare using two different functions as listed below:
- IF function
- Nested IF function
You may also like:
- Add leading zeros in SharePoint calculated column
- SharePoint Calculated Column to Extract Email from Person Field
- SharePoint Online Calculated Column LEN Function

Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.