To create the formula, you have to combine IF, AND and OR functions. The following formula is more simple and will give the same result as the one you are using:
In case of more conditions, it is needed only to add values into AND function. For example:
To add OR condition, you need to include OR function inside AND function
. The formula could look like:
The results will be:
You can also include AND function inside OR function when needed.