search
HomeTopicsexcelPractical Excel skills sharing: Use 'conditional formatting' and 'function formula' together

In the previous article " Practical Excel skills sharing: "Data validity" can be used like this! ", we learned 3 tips to make data validity more efficient. Today we will talk about conditional formatting with function formulas. Through two examples, we will introduce how "conditional formatting" and "function formulas" are used together. Come and learn!

Practical Excel skills sharing: Use 'conditional formatting' and 'function formula' together

Everyone knows how to play conditional formatting, but I believe you don’t know how to find the maximum value of each row in 100 rows of data at the same time and mark it. Today we will use 2 examples to learn how to use conditional formatting with function formulas.

Example 1 [Highest score color marking for multi-row data]

Speaking of using conditional formatting to mark the maximum value, I believe everyone knows, This can be accomplished by using the items in the "Project Selection Rules" as shown in the figure below, but this operation is relatively limited. If we have 100 rows of data, what if we want to mark the highest value of each row at the same time? Let me explain to you the formula to solve this problem.

Practical Excel skills sharing: Use conditional formatting and function formula together

Recently, we will conduct assessments on four subjects including excel, word, ppt, and comprehensive. The student test scores are recorded in the table. Now you need to fill in the cells with the highest score of each student with green.

Practical Excel skills sharing: Use conditional formatting and function formula together

Operation steps:

(1) Select the D2:G13 data area and click [Conditions] in the [Start] tab Format] and select [New Rule].

Practical Excel skills sharing: Use conditional formatting and function formula together

(2) Open the [New Format Rule] dialog box and select the rule type [Use formulas to determine the cells to be formatted]. Enter the formula =AND(D2=MAX($D2:$G2),D2"") in the editing rule description below. Click [Format] to set the cell fill color to green.

Practical Excel skills sharing: Use conditional formatting and function formula together

Function formula analysis

(1) D2=MAX($D2:$G2) determines whether D2 is equal to $D2: The maximum value in the $G2 area, returns TRUE if they are the same, otherwise returns FALSE. The $ symbol is added to the column coordinates to indicate an absolute reference, so that the data will be judged in columns D-G. The row coordinates are relative references. Every time you move down one row, the formula automatically changes to the corresponding row coordinates.

(2) D2"" means that D2 is greater than or less than a blank cell, then TRUE is returned, otherwise FALSE is returned.

(3) The AND function determines whether the above two conditions are both true. If both are true, it returns TRUE and the cell will be filled with green.

After editing the formatting rules, click [OK] to enter [Conditional Formatting Manager] (Note: Conditional Formatting Manager can be understood as storing the set conditional formatting)

Practical Excel skills sharing: Use conditional formatting and function formula together

I saw the conditional formatting just set in the manager. The area where the current conditional formatting is applied is fixed to the $D$2:$G$13 cell range. If our data range changes, just modify the application cell range.

Click [Apply]-[OK] in the above picture to complete the highest score color marking. The final result is as follows.

Practical Excel skills sharing: Use conditional formatting and function formula together

You can try changing the formula and color-coding the lowest score!

Example 2 [Contract Expiration Reminder]

How to set a contract expiration reminder in the form? I believe that all partners in contract management have such needs. The simplest way is to use the "Occurrence Date" in "Conditional Formatting" to display the cells containing the data that is about to expire in a special color.

Practical Excel skills sharing: Use conditional formatting and function formula together

#But this method only has the following options. What if I want to find out the contracts that will expire within 5 days? You need to use function formulas.

Practical Excel skills sharing: Use conditional formatting and function formula together

The following table is the labor contract record table for employees of the Marketing Department of China Unicom Group Corporation. The table records the employee's entry date and contract termination date. Now we need to use conditional formatting to automatically color-code reminders for employees whose contracts are about to expire.

Practical Excel skills sharing: Use conditional formatting and function formula together

Operation steps:

(1) Select the H2:H13 data area and click [Conditional Formatting] in the [Start] tab . Select [New Format Rule], open the [New Format Rule] dialog box and select [Use formulas to determine the cells to be formatted]

Practical Excel skills sharing: Use conditional formatting and function formula together

(2) In the editing rule description In the input setting condition, we enter =DATEDIF(TODAY(),H2,"d")

1Practical Excel skills sharing: Use conditional formatting and function formula together

Maybe many friends are not very familiar with the meaning of DATEDIF(TODAY(),H2,"d")

Let’s use a table to briefly introduce this function:

1Practical Excel skills sharing: Use conditional formatting and function formula together

As you can see, we use the entry date and the current date (today ()Return the current date) for comparison, using "y", "m", and "d" as calculation units respectively, and return the number of years, months, and days between the two dates in turn. Note: The first parameter of the function formula is a small date, and the second parameter is a large date.

After understanding the DATEDIF function, it is not difficult for us to understand the formula DATEDIF(TODAY(),H2,"d")

Today we shared with you through 2 examples how to combine formulas in conditional formatting to judge and label data. There are many related examples in real work, such as:

1. Repeated data can be marked through the =COUNTIF($H$3:$H$13,H2)>1 function.

2. Use the =VLOOKUP($H2,$M:$M,1,0)"#N/A" function to directly color the matched cells. You can try it out!

Related learning recommendations: excel tutorial

The above is the detailed content of Practical Excel skills sharing: Use 'conditional formatting' and 'function formula' together. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:部落窝教育. If there is any infringement, please contact admin@php.cn delete
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)