Home  >  Article  >  How to nest if and or functions

How to nest if and or functions

步履不停
步履不停Original
2019-06-26 11:49:3749163browse

How to nest if and or functions

Today we will talk about how to nest if and or functions. If and or functions can be nested as long as one of multiple conditions is met.

We will mark those whose gender is "male" or region is "Shanghai" in the table below as "Y".

How to nest if and or functions

Method:

Enter the formula in the target cell: =IF(OR(D3="Male",E3="Shanghai")," Y","").

Interpretation:

1. The grammatical structure of the OR function is: (condition 1,, condition 2... condition N). If the value of any parameter is TRUE, TRUE is returned. FALSE is returned only when all conditions are FALSE.

2. Use the IF function to determine the return result of the OR function. If it is TRUE, return "Y", otherwise return "".

For more technical articles related to frequently asked questions, please visit the FAQ column to learn more!

The above is the detailed content of How to nest if and or functions. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn