search
HomeTopicsexcelExcel function learning: the dark horse in the query world - MAX()!

Isn’t MAX a function that finds the maximum value? When did you become the “dark horse in the query world”? Did VLOOKUP even feel defeated? The following article will give you an in-depth understanding of MAX's query function. I hope it will be helpful to you!

Excel function learning: the dark horse in the query world - MAX()!

Everyone knows that VLOOKUP can match the data we need according to the given content. Because of this, it has a great reputation in the function community. But for the three examples I want to share today, if you use VLOOKUP to match the data, it will be a bit troublesome (interested friends can try it yourself). Just when VLOOKUP was having a headache, the MAX function solved all three problems with just one routine without saying a word.

Some friends may be curious, isn't MAX a function that finds the maximum value? How can it solve the problem that VLOOKUP can't solve? And what is this routine? Let’s take a look below to understand...

Example 1: Find the latest business date of each dealer in the business details

In order to facilitate understanding of the problem, the data source only retains two columns of data: dealer and business date. Now we need to get the date of the latest business for each dealer. (Tip: The business dates in the data source are arranged in ascending order.)

Excel function learning: the dark horse in the query world - MAX()!

I don’t know how to use VLOOKUP to solve the problem? The routine used by MAX is as follows:

=MAX(($A$2:$A$18=D2)*$B$2:$B$18)

Please see the animation demonstration for the input method :

Excel function learning: the dark horse in the query world - MAX()!

Note that after entering this formula, you must hold down the Ctrl and Shift keys at the same time and press Enter. Braces will automatically appear in the formula.

How to understand this formula is the question that everyone is most concerned about. In fact, the principle is very simple. First, make a comparison to see which data in column A is consistent with the supplier we need to judge, that is, $A$2: $A$18=$D2 is the function of this part. Select this part of the formula in the edit bar and press the F9 key to see the calculation results of the formula.

Excel function learning: the dark horse in the query world - MAX()!

You can see that the result of the formula is a set of logical values. When the content of column A is consistent with the dealer to be matched, TRUE is obtained, otherwise FALSE is obtained.

The next step is to use this set of logical values ​​to multiply the business dates in column B (dates in Excel are essentially numbers). TRUE is the same as the number 1 when performing operations, and FALSE is performing operations. is the same as the number 0, so the calculation is like this.

Excel function learning: the dark horse in the query world - MAX()!

In the obtained set of numbers, 0 indicates the value returned when the corresponding dealer is not matched, and the numbers other than 0 indicate that the corresponding dealer is matched. The business date to be returned after business consultation. The largest value is the latest date, so MAX can easily get the final result.

If the result you produce is not a date but a number, it will be no problem to change the cell format to date format.

Example 2: Get the corresponding bonus according to the job number or name

Usually when performing data matching, a fixed condition is used Find. And in this example, our condition is one of the two.

Excel function learning: the dark horse in the query world - MAX()!

Regardless of the job number or name, you can get the corresponding bonus.

I don’t know how VLOOKUP can solve this problem? Anyway, MAX is still the same routine:

=MAX(($A$2:$B$13=E2)*$C$2:$C$13)

Excel function learning: the dark horse in the query world - MAX()!

The formula entry method and principle will not be described in detail. It is exactly the same as Example 1. Let’s take a look at Example 3.

Example 3: Find the corresponding group code according to the name

Each group has four members, find the group it belongs to according to the name of the group member code.

Excel function learning: the dark horse in the query world - MAX()!

If VLOOKUP still wants to struggle with the first two examples, this example can directly make VLOOKUP unable to find its way. MAX still follows the old routine:

=MAX(($B$2:$E$4=A7)*$A$2:$A$4)

Excel function learning: the dark horse in the query world - MAX()!

##How about this routine of MAX function? Isn’t it very powerful?

To use this routine, you need to pay attention to the following two points:

1. The search result is a number;

2. Note that the selection of the area for judging conditions and the area where the result is located must be accurate and locked.

Then the question comes, what if the result you want to find is not a number?

At this time, MAX alone cannot cope with it. IF or other functions are needed to meet the needs. We will introduce cases in this regard later.

Related learning recommendations: excel tutorial

The above is the detailed content of Excel function learning: the dark horse in the query world - MAX()!. 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
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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.