Home > Common Problem > body text

How to nest if and or functions

步履不停
Release: 2019-07-06 10:03:11
Original
49164 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template