Calculated Column with IF / OR

Copper Contributor

Hi,

 

I need a calculated column to compare the values in two other columns and IF either of them are true, return True (Yes), if not return False (No). I have the below but im obviously going wrong with the syntax. Any help appreciated.

 

=IF(OR[Column1]="Banana", [Column1]="Apple"),'True','False')

2 Replies

@Barking_Mad you've put the result into single quotes which is why you are getting the error, it should be:
=IF(OR(Fruit="Banana",Fruit="Apple"),"True","False")

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@Barking_Mad Are you trying to create a calculated column with Boolean (Yes/No) data type to show True/False values (check marks) in list view?

 

In that case, you can use simple formula like: 

 

=OR([Column1]="Banana",[Column1]="Apple")

 

Example:

 

=OR([Title]="Item 1",[Title]="Item 2")

 

Column settings

ganeshsanap_0-1679922030666.pngOutput

ganeshsanap_1-1679922109982.png


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs