How to use multiple conditions of excelif function
Excel if function syntax:
1. Expression: IF (logical_test,[value_if_true],[value_if_false])
Chinese expression: if (condition, the operation to be performed when the condition is true, the operation to be performed when the condition is false)
2. Description: [value_if_true] and [value_if_false] represent optional items, that is, they can Do not write
if. The steps to use multiple conditions are as follows:
Example: If you want to mark the clothing sales table, the "major category" is "women's clothing" and the "price" is greater than For clothing that is equal to 80 and the "sales volume" is greater than 800, the operation process steps are as follows
1. Use multiple ifs nested:
Operation process step description: Select cell H2 and put the formula =IF(C2="Women's Clothing",IF(E2>=80,IF(F2>800,"Satisfies the condition","Does not satisfy the condition"),"Does not meet the condition"),"No "Conditions met") is copied to H2 and press Enter to return to "Conditions not met"; select H2 again, move the mouse to the cell fill handle of H2, hold down the left button and drag down, the cells passed by Fill it with "conditions not met" and press Ctrl S to save. Similarly, H3 is filled with "conditions met", and other cells are still filled with "conditions not met".
Formula description: =IF(C2="Women's Clothing",IF(E2>=80,IF(F2>800,"Satisfies the conditions","Does not meet the conditions"),"Does not meet the conditions"), "The condition is not met")
consists of three ifs, that is, two ifs are nested in one if. The condition of the first if is C2="women's clothing". If the condition is true, then execute IF(E2>=80,IF(F2>800,"Condition satisfied","Condition not satisfied"),"Condition not satisfied" ); otherwise it returns "condition not met". The condition of the second if is E2>=80. If the condition is true, then execute IF(F2>800, "Condition is met", "Condition is not met"), otherwise "Condition is not met" is returned. The condition of the third if is F2>800. If the condition is true, it returns "the condition is met", otherwise it returns "the condition is not met".
2. Use And to combine multiple conditions to form an "AND" relationship
Put the multi-if nested formula in the above example =IF(C2="Women's Clothing",IF(E2> =80,IF(F2>800,"Conditions are met","Conditions are not met"),"Conditions are not met"),"Conditions are not met") Use And combination instead. The operation steps are as follows
Instructions for steps in the operation process: Select cell H2 and put the formula =IF(AND(C2="Women's Clothing",E2>=80,F2>800),"Satisfies the condition", "Does not satisfy the condition" Condition") is copied to H2 and press Enter to return "Condition not met"; similarly drag down and save, returning the same result as the previous example, indicating that the formula is correct.
Formula description:
=IF(AND(C2="Women's Clothing",E2>=80,F2>800),"Satisfies the conditions","Does not meet the conditions")
The formula uses the And function to combine three conditions, namely C2="Women's clothing",E2>=80,F2>800. When three conditions are met at the same time (i.e. AND(C2="Women's clothing",E2>= 80,F2>800) returns "true"), returns "condition is met", otherwise returns "condition is not met".
3. Use Or to combine multiple conditions to form an "or" relationship
Combine And in the above example with multiple conditions formula =IF(AND(C2="Women's Clothing",E2> ;=80,F2>800), "conditions are met", "conditions are not met") Use Or combination instead, the operation process steps are as follows:
Operation process step description : Select the H2 cell, copy the formula =IF(OR(C2="Women's Clothing",E2>=80,F2>800),"Meet the conditions","Do not meet the conditions") to H2, press Enter to return "Satisfy the conditions"; drag down and save, and all return to "Satisfy the conditions".
Formula description: =IF(OR(C2="Women's Clothing",E2>=80,F2>800),"Satisfies the conditions","Does not meet the conditions")
Use Or for the formula The function combines three conditions, namely C2="Women's clothing",E2>=80,F2>800, that is, OR(C2="Women's clothing",E2>=80,F2>800), which means: as long as one condition is met , it will return "true"; it will return "false" if none of the conditions are met. In the demonstration, each record satisfies a condition, so all records "satisfy the condition" are returned.
For more Excel-related technical articles, please visit the Excel Basic Tutorial column!
The above is the detailed content of How to use multiple conditions of excelif function. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



This article will guide you through the process of creating a timeline for Excel pivot tables and charts and demonstrate how you can use it to interact with your data in a dynamic and engaging way. You've got your data organized in a pivo

This tutorial demonstrates how to efficiently locate the top N values within a dataset and retrieve associated data using Excel formulas. Whether you need the highest, lowest, or those meeting specific criteria, this guide provides solutions. Findi

Mastering Google Sheets Sorting: A Comprehensive Guide Sorting data in Google Sheets needn't be complex. This guide covers various techniques, from sorting entire sheets to specific ranges, by color, date, and multiple columns. Whether you're a novi

In this tutorial, you'll learn how to use regular expressions in Excel to find and extract substrings matching a given pattern. Microsoft Excel provides a number of functions to extract text from cells. Those functions can cope with most

This guide shows you two easy ways to enable email templates in Gmail: using Gmail's built-in settings or installing the Shared Email Templates for Gmail Chrome extension. Gmail templates are a huge time-saver for frequently sent emails, eliminating

This tutorial shows you how to add dropdown lists to your Outlook email templates, including multiple selections and database population. While Outlook doesn't directly support dropdowns, this guide provides creative workarounds. Email templates sav

Wouldn't it be convenient if you could compose an email now and have it sent at a later, more opportune time? With Outlook's scheduling feature, you can do just that! Imagine that you are working late at night, inspired by a brilliant ide

This tutorial demonstrates several methods for separating text and numbers within Excel cells, utilizing both built-in functions and custom VBA functions. You'll learn how to extract numbers while removing text, isolate text while discarding numbers
