Home>Article>Topics> How to calculate deadline in excel

How to calculate deadline in excel

藏色散人
藏色散人 Original
2020-05-10 09:12:49 11016browse

How to calculate deadline in excel

How to calculate the deadline in excel? Calculate the number of days and time between two dates Calculation

First, calculate the number of days between two dates.

Recommended: "Excel Tutorial"

In excel, you can directly subtract two dates to get the number of days between the two dates, as shown below:

How to calculate deadline in excel

Calculate the number of days between two dates, you can also use the hidden function DATEDIF function to complete, the formula is as follows:

=DATEDIF(A2,B2,"d" )

How to calculate deadline in excel

DATEDIF() function knowledge points introduction:

The syntax of this function is like this: =DATEDIF (start date, end date, third parameter) , the third parameter can have several situations, and can respectively return the number of days, months and years of the interval.

How to calculate deadline in excel

Let’s take a look at how to calculate time.

First of all, the simplest is to directly subtract the two times to get the time difference. But note that the cells storing the results must be set to time format.

How to calculate deadline in excel

The above example is for a time that does not exceed 1 day. If it exceeds 1 day and is directly subtracted using the above method, what will be the result?

How to calculate deadline in excel

The above example more often appears in the time calculation of the attendance sheet. Since the two dates may span 2 days or more, the default display result is incorrect and needs to be set. How to format cells to display normal time differences. As shown in the figure below, set the cell format to "[h]:mm:ss", where h plus square brackets can fully display the difference in hours. Without square brackets, only the difference in hours after deducting days can be displayed.

How to calculate deadline in excel

Tips:

When subtracting the time and date mentioned above, you need to subtract the smaller one from the larger one, otherwise unexpected results will occur. mistake.

The above is the detailed content of How to calculate deadline in excel. 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