# datedif

1. ### datedif() arguments

Hi I want to understand datedif() function. What I do not understand the logic behind "Y", "YM", MD" Why YM to find month, why not only M? and why MD to find day? why not D same as Y for year. I do not understand the logic behind YM and MD? Thank you so much = datediff(A1,today(),"Y") - to...
2. ### Calculate Age

Hi I am trying to find the best and easiest way to calculate age. I thought it is something easy but it turn it is a bit complex. The websites below showing how to calculate age. But I only found Excel-Easy.com is better and easier yet it is not that easy because they use a function called...
3. ### Trouble Using Formulas in VBA

Hi, I have a specific problem with some code, and then a general question to ask as well. I started learning/writing VBA code about 4 months ago; therefore, I apologize for my ignorance on a lot of this stuff; anyways, my general question would be, 1. Is there any general / simple way to use...
4. ### DATEDIF when two dates are the same

Hi I have this formula which i am using to find the number of days difference between from two dates DATEDIF(F5,P5,"D") when the two dates are the same it is coming back with 0, how do i change this formula so when the dates are the same it brings back 1? Thank you
5. ### where do i get Dateif formula

Hi team, where do i get Datedif formula, in which version of excel?
6. ### IF ELSE Usage

Hello I started a new job and I need help with my excel sheet. I have a column with dates. At the bottom I am using =MAX(F1660:F1680) to result the most recent date. Then I am using =DATEDIF(F1681,TODAY(),"D") to use the result of MAX date to count the number of days since the most recent date...
7. ### DATEDIF not working.

Hi, Trying to retrieve the number of months between the two dates below. Dates are generated through functions beneath. 2019-01-01 A1=DATEVALUE(YEAR(TODAY())&"-01") 2019-04-01 B1=EDATE(DATEVALUE(MID(\$C\$12;18;4)&"-"&MID(\$C\$12;23;2));1) =DATEDIF(A1;B1;"M") does not work, returns "1900-01-03"...
8. ### Odd DATEDIF Result

<p>I was wondering if any of you have seen this sort of result from DATEDIF. I am using this function to determine the age in years, months, and days of various items. </p> <table> <tr><td> </td><td>A</td><td>B</td><td>C</td></tr> <tr><td>1</td><td>Start Date</td><td>31-Jul-17</td><td></td></tr>...
9. ### Monthly report for yard activity - ISO best method

Hi, I'm new to the forum but I've been using Excel for several years. I consider myself at least an intermediate user, however I don't write a lot of code. Better at copy paste, edit. I inherited the task of adding some KPI's to an already existing workbook. It was full of missing and...
10. ### Generating a DATEDIF value of "0" when the EndDate is in the past and then using in IF formula

Hello! I am trying to use a DATEDIF formula to calculate a number that is then used to in an IF formula to generate a score. The issues is that for some of the DATEDIF calculations the EndDate is before the StartDate. When this happens, I have the formula generate a "0". I then use the...
11. ### datedif()

Hi Why datedif() is hidden function? are they other functions hidden? Thank you very much.
12. ### DateDiff Mystery XL2007

Hi, I am quality checking some work that took a few weeks to complete. I used the DateDif function to calculate the number of whole months between two dates. Here is an example: =DATEDIF("9/18/2014","2/17/2015","m") Result = 4 I know that this function will round down to the nearest whole...
13. ### Problems using DATEDIF() function

In my sheet I import dates in the format dd-mmm-yyyy which is the english region format. My problem is that my Windows is set up to Danish region format (dd-mmm-åååå). This causes the DATEDIF() function to fail. The DATEDIF() function works if I go to the Windows region settings and change to...
14. ### Matching day due with bill amount and falling under the appropriate date range. Quite challenging.

Hello. I'm trying to create a chart that automatically updates cells based on multiple criteria. I have been working on it for a week and I'm getting close. I can get some data to cooperate, but I have a few obstacles. I have made a second chart below the main chart that uses the old...
15. ### Datedif: Error: You've entered too many arguments for this Fuction

please help i have this formula and it is giving me a Error: You've entered too many arguments for this Fuction =IFERROR(IF(DATEDIF(\$V15,\$W15,"y")=0,"",DATEDIF(\$V15,\$W15,"y")&"y ")&IF(DATEDIF(\$V15,\$W15,"ym")=0,"",DATEDIF(\$V15,\$W15,"ym")&" m...
16. ### Date Formulas with IF ?

Hello, I was wondering if someone can help me in creating a formula based on dates. I need the formula to be able to tell me the month of a set date depending on the day of the month. The criteria is: If the start is after 1st of the month, populate the following month, if not use the...
17. ### Sumproduct and datedif #num error

Hi, I'm working on an excel function after many years away and I have come a little unstuck. I understand the problem I am just struggling to find a solution to it and would appreciate any help anyone might be able to offer. The function is straightforward <code>...
18. ### Negative #'s using DATEDIF

I'm using the following formula which works great until it needs to return a negative number: =DATEDIF(G13,D13,"D)) D = exp date G = date quote sent if date quote sent is after exp date, it doesn't return a number. Is there an easy way to resolve? Thanks! Jess
19. ### Auto calculate VBA Date Diff when extract data

Hi, Is there anyone could help me. Is it possible to auto calculate datedif function because I have many data.ex: I have 10 date in column A & B. Column A (date start) Column B (date end) Column C( datedif total) Tq.
20. ### Wrong math???

My formula is : =DATEDIF(O2,AL\$1,"y")&" years, "&DATEDIF(O2,AL\$1,"ym")&" months, "&O2-DATE(YEAR(O2),MONTH(O2),1)&" days" Where O2 is the hire date and AL\$1 is today() The formula works, kinda. It isn't doing the math correctly. I have a person who started exactly a year ago and it is 2...