Saturday, March 5, 2011

Pedal Edema And Diuretics

years, months and days between dates

"I need to calculate the years, months and days since a specific date to date."

The solution is fairly simple to use, in terms of John Walkenbach, Excel mysterious function, that is, DATEDIF . This feature does not appear in the drop-down list of features more Date and Time. Neither appears in the Insert Function dialog , so we'll have to manually enter Why? Microsoft's ways are inscrutable ... The truth is that it is a useful feature that step describe:

DATEDIF = (start_date, end_date, Argumento_tiempo)

The first two arguments are self-explanatory while the third argument is a code that represents the time unit of interest. Namely:

"Y" will return the number of full years between start date and end date.
"M" will return the number of total full months between start date and end date.
"D" will return the total number of days between start date and end date.

"YM" will return the months between the dates and who do not complete one year.
"MD" will return any day of the month between dates that do not complete a month.
"YD" will return the days between dates that do not complete a year.

from the following example and data entry:


We are located in cell C5 and type the formula to calculate the number of full years elapsed between the start date and end date:

= DATEDIF ($ C $ 2, $ C $ 3, "Y")


Once this is done, and since we put absolute references to the initial date and end date, you can copy down to cell C7 and simply changed after the third argument formulas in the C6 and C7. Namely:

In C6 = DATEDIF ($ C $ 2, $ C $ 3; "YM") that gives us the number of months between the dates and do not complete one year.

= DATEDIF In C7 ($ C $ 2, $ C $ 3, "MD") that gives us the number of days you do not complete a month.


If we want to display the complete output in one cell, then we use the CONCATENATE (we use the & operator) to join the different parts of the equation. In cell B9 we write the following formula:



Here you can see the result of applying the different options time argument in our example:


0 comments:

Post a Comment