One of the most common tasks in Excel is checking whether a cell contains a given value or not. If you want to do something specific when a cell equals either this or that , you can use the IF function along with the OR function in Excel. In this article, we will provide some cute formulas to solve this problem. Let’s get into this article!! Get an official version of ** MS Excel** from the following link: https://www.microsoft.com/en-in/microsoft-365/excel
Generic Formula:
- Use the below formula to find if the cell value is equal to this or that.
=IF(OR(A1=”this”,A1=”that”),”x”,”y”)
Syntax Explanations:
- IF – In Excel, the IF function helps to return one value for a TRUE result, and another for a FALSE result.
- OR – It is a logical function to test multiple conditions at the same time. The OR Function helps to return either TRUE or FALSE.
- A1 – It is the input data from your worksheet.
- Comma symbol (,) – It is a separator that helps to separate a list of values.
- Parenthesis () – The main purpose of this symbol is to group the elements.
Practical Example:
Refer to the below example image.
- First, we will enter the input values in Column B.
- Then apply the above-given formula to the formula bar section.
- Finally, it will display the result as per the below image.
Conclusion:
From this short tutorial, we have described the simple formula used to find if the cell is equal to this or that in Excel by using the IF function along with the OR function. If you have any doubts, let me know in the below comment box. Thank you so much for visiting our site!! Click here to know more about *Geek Excel **and Excel Formulas *!! **
Top comments (0)