Using the OR function to check cells for text or numbers in Excel
In this exercise we will be using the OR function to check cells for certain values. The formula will check column A for the text “fresh” or “excel” and return TRUE if it finds either word, otherwise, if the criteria is not met, it will return false. Here is how we will apply the OR Function.
How to use the OR Function to check cells for text
- Enter your text in column A from A1:A10.
- Select Cell B1 and type the following formula: =OR(A1=”fresh”,A1=”excel”)
- Press Enter. Use the fill handle to copy the formula down to B10
The formula will return TRUE once it finds either “fresh” or “excel” in the cell, otherwise it will return FALSE. You can use a similar formula to check for numbers as well, just don’t include the quotes. Apply the principles discussed on this page to your own worksheet and you will find success! This should work in Excel 97, 2000, 2003 and 2007.
- How to Check for Valid Numbers Using the T Function in Excel
- Combine Cells with text, date, time and numbers in Excel
- How to Use the FIXED function to round and convert numbers
- How to check for invalid values using the TYPE function in Excel
- How to check for future dates using TODAY Function in Excel