search
HomeTopicsexcelExcel function learning: due date calculation, several application examples of EDATE() function

Usually we always need to calculate various expiration times, such as contract expiration date, employee regularization date, product validity period, etc. The common practice is to use the DATE function to calculate, but the calculation formula of the DATE function is too cumbersome. Is there a simpler formula? Of course there is! Just use EDATE~

Excel function learning: due date calculation, several application examples of EDATE() function

In daily work, we often encounter calculations such as the employee's regularization date, contract expiration date, employee retirement date, product validity expiration date, etc. Issues related to dates. These problems may seem complicated, but in fact they only require a very simple function, which is EDATE. Today I will share several application examples of the EDATE function. I hope it will be helpful to everyone.

Example 1: Calculate the employee's regularization date

The picture below is a registration form for new employees of a company. They can become regular employees after three months of employment. It must be calculated based on the entry date. Date of formalization.

Excel function learning: due date calculation, several application examples of EDATE() function

No comparison means no harm. Let’s first take a look at how friends who don’t know the EDATE function write the formula:

=DATE(YEAR (D3),MONTH(D3) 3,DAY(D3))

Excel function learning: due date calculation, several application examples of EDATE() function

The formula for using the EDATE function is like this: =EDATE(D3,3 ),Is not it simple?

The EDATE function requires only two parameters, the start date and the number of months between.

Formula=EDATE(D3,3) means the date corresponding to the date in cell D3 three months later.

Example 2: Calculate the contract expiration date

As shown in the figure, the corresponding contract expiration date needs to be calculated based on the date and contract period when each person signed the contract. Today, it is also very easy to calculate the result using the EDATE function.

Formula: =EDATE(D3,E3*12)-1

Excel function learning: due date calculation, several application examples of EDATE() function

Different from the first example, this In the example, the date to be calculated is not the date 3 months later, but the date several years later. Because EDATE can only be calculated by month, you need to multiply the corresponding year in column E by 12 to turn it into the number of months to get the correct result.

Example 3: Calculate employee retirement date

As shown in the figure, the retirement date is calculated based on gender and date of birth. Males are over 60 years old and women are over 55 years old. retire.

Formula: =EDATE(C3,IF(B3="Male",60,55)*12)

Excel function learning: due date calculation, several application examples of EDATE() function

##at In this example, retirement age is determined based on gender. If you are a male, the retirement age is 60, and the retirement date is 60 years after your birth date; similarly, if you are a female, the retirement age is 55, and your retirement date is 55 years after your birth date.

First, use the IF function to determine the retirement age of each person. This part of IF(B3="Male",60,55) is easy to understand. If the value of cell B3 is equal to male, 60 will be returned, otherwise 55 will be returned. .

Then use the method of Example 2 to multiply the number of years obtained by the IF function by 12 to convert it into a number of months, and then use the EDATE function to obtain the retirement date.

Example 4: Calculate the expiration date of the product validity period

As shown in the figure, the product validity period is calculated based on the production date and shelf life of each product.

Formula:

=EDATE(B2,IF(RIGHT(C2,1)="Year",LEFT(C2,1)*12,SUBSTITUTE(C2,"Month","") *1))-1

Excel function learning: due date calculation, several application examples of EDATE() function

The difficulty of this example is that the shelf life is not a standardized number, and it has two forms: years and months. Let’s briefly analyze the idea of ​​​​this part of IF.

RIGHT(C2,1)="Year" The function of this part is to use the RIGHT function to extract the rightmost word of the cell in column C to determine whether the shelf life is calculated in years or months. If it is years, use LEFT to extract the number of years and multiply it by 12 to convert it to the number of months, which is LEFT(C2,1)*12.

(Note: This idea is based on the fact that under normal circumstances the shelf life will not exceed 10 years, so the leftmost digit is extracted as the year. If the year has two digits, you need to change to other ideas. .)

If it is not calculated by year, you need to extract the number of months. There are many ideas for extracting the number of months. This example uses the substitution function SUBSTITUTE to replace the word "month" in the cell with nothing (equivalent to deletion). The value obtained with the SUBSTITUTE function is text, so the text number needs to be converted into a numerical value by *1 at the end.

Finally, use the EDATE function to calculate the shelf life of the product.

Through the above four examples, everyone should have a clearer understanding of the usage of this function. The focus is on how to get the second parameter (number of months) based on actual problems. Sometimes you can use the data in the table directly, and sometimes You need to use other functions to get the required number of months.

The last point to note is that the number of months can be a negative number, which means that the date is found several months before the specified date.

Related learning recommendations: excel tutorial

The above is the detailed content of Excel function learning: due date calculation, several application examples of EDATE() function. 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

Video Face Swap

Video Face Swap

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

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

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.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

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