How to calculate the number of days in Excel
Why does taking days count make users headaches? If only calculating a short period of time is quite simple but a 7-day, a month with an irregular number of days and irregular leap years is indeed a problem.
How many days from January 9, 2015 to June 12, 2017? If you can find results within 5 seconds, you are truly a genius. However, this is no longer a problem when you know how to use Excel.
Calculate the number of days and months between any time
On the Excel spreadsheet, set any 2 days you want to calculate on 2 separate cells.
Here are a few sample equations. Check the box where you want to display the answer and enter one of the following commands (remember to replace the cell addresses that match your Excel table):
Calculate the number of days: = DATEDIF (D2, E2, 'd')
Calculate the number of weeks: = DATEDIF (D2, E2, 'd') / 7
Calculate the number of months: = DATEDIF (D2, E2, 'm')
Calculate the number of years: = DATEDIF (D2, E2, 'y')
Enter the command you need to enter into the answer box. For example, if we want to calculate the date, we enter the command = DATEDIF (D2, E2, 'd')
Calculate the cumulative time between any 2 days
We already know how to calculate the total number of days, months and years but what if we want to calculate the total cumulative time in the form of "day, month, year"?
We need to combine the equations above. Put the calculation function below in the box to enter the answer and press Enter:
= DATEDIF (D2, E2, 'y') & 'years,'
& DATEDIF (D2, E2, 'ym') & 'months,'
& DATEDIF (D2, E2, 'md') & 'days'
Note: Press Alt + Enter to add a new line and Ctrl + Shift + U to expand the cell and see the whole calculation function.
- How to combine 2 columns Full name in Excel does not lose content
- How to arrange incremental dates in Excel
- How to delete data, duplicate content in Excel
Have you ever used Excel to calculate dates? Do you know any other calculation method? Please share with us by commenting below!
You should read it
- DATEDIF () function (calculate the total number of years, total months or total days from two given periods) in Excel
- How to calculate the number of days in Excel - Functions, formulas for calculating the number of days in Excel
- DAYS360 function - The function returns the number of days between 2 dates, based on 360 days in Excel
- How to subtract dates, months, and years in Excel - Calculate the distance between two dates in Excel
- Calculation of age in Excel
- How to use the SUM function to calculate totals in Excel
- NPER function - The function calculates the period number of an investment in Excel
- DAYS360 function - The function finds the number of days between two dates based on a 360-day year in Excel
May be interested
- Extract images from PDF filesextracting images from pdf files for use for different purposes is the need of many people. in this article will have all the way to get photos from pdf files quickly, easily, please consult.
- How to convert Excel files to PDF online using Google Driveif you often use microsoft office excel to share with colleagues, friends, there will probably be cases where you want to send excel files in pdf format.
- Beautiful free PowerPoint slides for teacherswhether you are teaching a class, teaching lectures, running an instructional program or training students, the following powerpoint slides are perfect choices. some templates provide you with tables, charts and diagrams, while others provide you with simple educational theme themes that match your presentation.
- 7 pages of PowerPoint slide templates help your presentations 'sublimate'a good presentation should be invested in time and effort. you need to create attractive slide pages as content to attract audiences, not to make them boring. and a nice slide template will make your presentation sublimated.
- Set AutoSave feature in Office 2016surely you will be very frustrated when you are manipulating word or excel, the power is out and all effort is gone because you have not saved anything yet. now you don't need to worry anymore when microsoft office 2016 has autosave mode. this feature was updated last july for office 365 users.
- How to align spreadsheets before printing on Google Sheetsbefore printing spreadsheet data on google sheets, users should adjust the data sheet before printing to get a better layout.