). Izračunava broj dana, meseci ili godina između dva datuma. Formula needs to do the following: 1) Datedif to get the number of days between the hire date and the pay period date. Using the YEARFRAC Formula. This returns the number of years rounded. Alex. Antalet kompletta år mellan två datum. The DAYS function was introduced in Excel 2013 (for Windows, Excel 2011 for Mac); it is specifically designed to count the number of days between two dates. Gyrus Messages postés 3334 Date d'inscription samedi 20 juillet 2013 Statut Membre Dernière intervention 9 décembre 2016 525 Modifié le 31 janv. I don't know how I oversaw this error, and less do I know why the internet says. I've been typing =DATEDIF(D2, TODAY(),"Y") Excel seems to recognize the first cell as part of the function, but not the second value (i've tried other cells on the place of today() too. Type =DATEDIF (. 4 Calculate Number of Days Ignoring Years. 1. Excel DATEDIF function can be used when you want to calculate the number of years, months, or days between the two specified dates. אזהרה: Excel מספק את הפונקציה DATEDIF כדי לתמוך בחוברות עבודה ישנות יותר מ- Lotus 1-2-3. - PHD in Economy ; - Certifyed Public Accountant ;- Auditor ;- 2 Years Master Deg. The integer bit is days, and the decimal bit is time. You can use the DateDiff function to determine how many specified time intervals exist between two dates. This function returns the number of whole days, months or years between Start date and End date. Let's go over a simple procedure for converting numbers to years, months, and days in Excel using formulas. Click the cell containing the date of birth. DATEDIF function. DATEDIF (A1, A3, "D")=. 경고: Excel에서는 Lotus 1-2-3의 이전 통합 문서를 지원하기 위해 DATEDIF 함수를 제공합니다. It does this by holding the dates and times as decimals. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Gyrus Messages postés 3334 Date d'inscription samedi 20 juillet 2013 Statut Membre Dernière intervention 9 décembre 2016 525 Modifié le 31 janv. The formula =DATEDIF (A1,B1,"y") returns the age in years of that person. 書式は. For complete instructions, to c alculate age in accumulated years, months, and days, and to. Excel won't even autocomplete the. 5. Days function gives you the number of days between. A. 0 Інші… Menghitung jumlah hari, bulan, atau tahun di antara dua tanggal. Select the cell “D8,” where the TODAY function needs to be applied. datedif. In a few recent posts, we have explored different ways to calculate dates and times in Excel and learned a variety. Add the “ YEARFRAC ” function. Select a cell in the third column so that it is adjacent to the start and end dates, as shown below. To use the DATEDIF function, first enter the two dates into two separate cells. OP needs to write the complete syntax of DATEDIF to make this workable. 在使用excel的时候突然发现,之前一个常用的datedif函数无论如何都找不到了,想问问是不是也有和我一样的情况? 1. yd for calendar days between dates, ignoring the years. =DATEDIF (C5,D5,"Y") Thirdly, press Enter to get the result. In the example shown, the formula in E5 is: = DATEDIF. Tip: To calculate whole workdays between two dates by using parameters to indicate which and how many days are weekend days, use the NETWORKDAYS. If the value already contains text, make sure it follows a correct format, for e. Here we will use the DATEDIF formula to get any one of the results, then use the auto-fill handle to get all the results. Here, Datedif if the function. Elle permet à l’aide de la formule de date Excel de calculer en année, en mois, et même en jour. =DAYS (A3, A2)Sintaks atau cara penulisan fungsi DATEDIF pada microsoft excel adalah sebagai berikut: DATEDIF (start_date;end_date;unit) Untuk menghitung masa kerja start_date pada sintaks tersebut diisi dengan tanggal awal seorang pegawai atau karyawan dihitung masa kerjanya. Menghitung Selisih atau Jarak di antara 2 tanggal sangat dibutuhkan dalam aplikasi rawat inap ataupun untuk. Trong ô C4, hãy dùng công thức DATEDIF bằng tham số "MD" . 1 Determine Number of Days. But yeah, it's weird - DATEDIF is the one hidden feature in Excel, but there isn't really a replacement. In the Formulas Helper dialog, please select Convert days to year month day. Here is a link to a mini-blog article which contains the same information that you referenced in your message (you may find it easier in the future to refer to my article than an internal message in a forum thread). Check Difference option from the Type section;; In the Arguments input textboxes, select the cells which. "Y" is the reference to the year's parameter in. Cell B2 is the End date reference. Write down the formula as: “=DATEDIF (A2,B2,"y")”. Right-click on the cell and click Format Cells (or press CTRL+1) and make sure the cell follows the Text format. อาการแปลกๆ ของ DATEDIF. Use the MONTH function to obtain the month value for each date, and then calculate the difference between the values. Step 2: First, we must enter the DATEDIF formula in the first row and use “YD” as a unit in a formula. This function is available since LibreOffice 3. 3 Determine Number of Years. Cú pháp dùng hàm DATEDIF trong excel. Top Contributors in Excel: HansV MVP. By default, January 1, 1900 is serial. Moi aussi (15) Posez votre question. The Excel DATEDIF function returns the difference between two date values in years, months, or days. I need to do the datedif function for every value from e2 to e151 and the amount of months from those dates to September 1 2013 with the values in j2 to j151 Solved by O. Since both the dates, 22nd and 23rd March, fall on working days; Excel excludes them from the working day's calculation. To begin, enter 0 as the function’s first argument. Syntax DATEDIF ( start_date, end_date, unit) Remarks Dates are stored as sequential serial numbers so they can be used in calculations. By. A compatibility function that comes originally from Lotus 1-2-3, Excel will not help supply arguments when the function is entered. Dim Msg. Step 1: Enter the DOB of a person in the cell. The table below shows a few examples of dates and their corresponding serial. Kemudian, masukkan rumus =DATEDIF. Its syntax includes three arguments: start_date, end_date, and unit. Any idea why I miss DATEDIF Function. FirstDayOfWeek: A constant that specifies the first day of the week. Google Sheets will now tell you that the spacecraft has traveled for 569 days. You will have to enter the formula with the correct syntax and the formula will work. You can format the value returned by TODAY with a date number format. Cảnh báo: Excel cung cấp hàm DATEDIF để hỗ trợ sổ làm việc trước đây từ Lotus 1-2-3. 2013 at 13:53. Select the cell with the date of birth. Step 1: First, calculate the difference between two dates in Excel, so apply the B2 – A2 formula. Step 4: Enter the end date as B2 in cell C2. ] com - Untuk menghitung umur atau usia bisa menggunakan rumus excel DATEDIF. It is important to note that the DATEDIF function is not available in all versions of Excel. Thus simply type in cell =DATEDIF (. IF the number of days as in your formula is negative, then reduce the month by one, then find out how may days that month normally has, and if it's a February, determine whether it's a Leap Year, and then calculate which day it is by subtracting the negative day number from the appropriate. No lookup list required. Important note – Unlike the other functions, the function will not appear as you start to type this date function. Please be aware that the floating point storage of date in Excel can cause rounding errors in the long run (errors carried over in iterative processes will get to significant levels in the time component (seconds and sometimes even the minutes) and can thus cause erroneous dates (with times around midnight) and times!!Jon Wittwer September 1, 2017 14 comments. 3) Determine if the number of hours in that pay period is greater than the maximum amount allowed. You can vote as helpful, but you cannot reply or subscribe to this thread. בתרחישים מסוימים, הפונקציה DATEDIF עשויה לחשב תוצאות שגויות. Sử dụng DATEDIF một lần nữa với "MD" để tìm ngày. =DATEDIF ( วันเริ่มต้น, วันสิ้นสุด, รูปแบบของผลลัพธ์. Hàm DATEDIF có thể tính toán các kết quả không đúng trong một số kịch bản nhất định. Dùng hàm datedif để tìm ngày. Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000; Type of Function. What is the DATEDIF Function? The DATEDIF Function in Excel is categorized under Excel Date/Time functions. =DATEDIF (開始日,終了日,単位)「開始日」・・・期間の月数を. Trong ô C4, hãy dùng công thức DATEDIF bằng tham số "MD" . DATEDIF in Google Sheets: Formula & Examples - Add “YM” Unit. Rumus DATEIF Excel - Seseorang. If need to know the number of days between two dates, that is very easy to do in Excel. Excel DATEDIF - calculating date difference in days, weeks, months or Check Details How to. If not, we might need more information. Merci bien . The DATEDIF function is available in any version of Excel, but it is not shown in the list of functions. For example, January 1, 1999 is 36161, and January 1, 2010 is 40179. Figure 4. Step 3: Now write. This thread is locked. Tải và cài đặt Office 2013 Sử dụng bản thấp hơn, các bạn có thể tải và cài đặt Office 2007. Modified 2 years, 7 months ago. For example, use DATE (2008,5,23) for the 23rd day of May, 2008. Below I again have the same data set and I want to calculate the duration of service of each employee in years and months. Target: 06-01-2015 Step 1: In this example, we will use the following data to find the no. The DATEDIF function is a powerful Excel formula that calculates the difference between two dates. Fungsi DATEDIF ini pada dasarnya adalah Fungsi Excel yang disediakan untuk kompatibilitas dengan Lotus 1-2-3, dan masih bisa digunakan pada semua versi excel termasuk microsoft excel 2007, 2010, 2013, 2016 maupun versi office excel yang lebih baru. Second, let me point you to the newly released LET function, which will enable you to write in a formula only once something like DATEDIF (A3, (B3- ( (B3-A3)-NETWORKDAYS. 1. 指定した日から指定した日までの経過年数や日数などを自動計算してくれる関数 です。. This thread is locked. DATEDIF was introduced in Excel to ensure compatibility with Lotus 1-2-3, but it has never really been accepted as a standard Excel function. Cell A2 is the Start date reference. I am attempting to use the DATEDIF function within an IF statement to tell me the amount of days since I have. Introduction to data calculationsWorking with date time format excel 2013 beginners tutorial. 3. When you test the Power Query function with the Excel function, you will see different results for the parameter MD. Right-click on the cell and click Format Cells (or press CTRL+1) and make sure the cell follows the Text format. Jon Wittwer September 1, 2017 14 comments. Enter as string. In Excel 365 this function is still available for backwards compatibility but should not be used. Excel treats months as values (1 through 12), which makes it easy to subtract an earlier date from another date as long as both dates fall in the same year. Part of Google Cloud Collective. Must be a reference to a cell containing a DATE , a function returning a DATE type, or a number. It returns a numerical value that denotes the number of Years/Months/Days between the two specified dates. The simplest and most accurate formula to calculate age in Excel is =DATEDIF (birth_date,as_of_date,"y"). The unit argument specifies the type of information to return, such as days, months or years. Warning: If the Start_date is greater than the End_date, the result will be #NUM!. Namun percayalah jika kalian teliti dan berhasil menguasai penggunaan yang tepat seperti pada formula datedif ini maka semua pekerjaan menjadi mudah. Let’s apply the TODAY function in cell “D8”. Other methods, such as =INT ( (end-start)/365. The Excel YEARFRAC function returns a decimal value that represents fractional years between two dates. 1. It’s syntax is: =DATEDIF(start_date, end_date, unit) start_date – The start date in Excel serial number format. DateDif function will return 0, which is appropriate result but DateDiff will return 1 instead of 0. For example: = YEARFRAC ("1-Jan-2018","1-Jan-2019") // returns 1 = YEARFRAC ("1-Jan-2018","1-Jul-2019") // returns 1. end. . Fungsi DATEDIF digunakan untuk menghitung perbedaan/selisih antara dua tanggal dalam bentuk unit waktu tertentu. The following table lists all the valid datepart values. Start Date = 08/25/2006 , End Date = 06/22/2020 , "Y". Dikatakan tersembunyi karena jika kita mengetik di cell excel, rumus ini tidak akan muncul, sehingga kita perlu mengetik manual =DATEDIF() agar rumus ini berjalan. Count days between dates with Excel DAYS function. To calculate the number of months between two dates as a whole number, you can use the DATEDIF function. Instead you would need to use the corresponding serial number: 42320. in 13 mins Problems will the DATEDIF function in excel. In the example shown, the formula in D5, copied down, is: = DATEDIF (B5,C5,"m") Note: DATEDIF automatically rounds down to the nearest whole month. I have a DATEDIF value, and on which the IF condition is not working. if C1 is blank and time interval between two dates (G2 and today) is more or equals F2-2, then ''Attention". בתרחישים מסוימים, הפונקציה DATEDIF עשויה לחשב תוצאות שגויות. Dim Msg. Close the brackets. In Excel's date system, dates are serial numbers beginning on January 1, 1900. . Az Excel munkalapon, ha két megadott dátum között szeretné kiszámítani az évek, hónapok, napok vagy hetek számát, a DATEDIF funkció az Excelben segíthet. Please pay attention that compared to DATEDIF, a DAYS formula requires the arguments in the reverse order: You can always ask an expert in the See moreUse the DATEDIF function when you want to calculate the difference between two dates. I can't find it listed anywhere on the formula tab, nor am I shown any reminder of what arguments to use. The DATEDIF function (Date + Dif) is a bit of an anomaly in. Hence, it doesn't pop up the syntax of DATEDIF if DATEDIF is written. VBA. Staff member. . Estimate Elapsed Time Between Two Dates by DATEDIF Function. Cell A2 is the Start date reference. For the final argument, we have to put the letter M within quotation marks. funkció. Excel interprets the year argument according to the date system your computer is using. A compatibility function that comes originally from Lotus 1-2-3, Excel will not help supply arguments when the function is entered. Use the DATEDIF function when you want to calculate the difference between two dates. I have the. It calculates the difference (DIF) between. Keep the formula result selected, and press Ctrl + 1 to display the Format Cells dialog, then under Number tab, click Date from the Category list. In this part of the article, I will show another easy way to change Date of Birth to Age in Excel. In addition, you can also use the DAYS function. EXclude start date, INclude end date DATEDIF. ฟังก์ชันทุกฟังก์ชันใน Excel สามารถหยิบจับมาใช้งานได้ แต่ไม่ใช่กับ DATEDIF ซึ่งนอกจากเป็นฟังก์ชันแห่งความลับแล้ว ยังถือเป็นฟังก์ชันต้องห้าม![SOLVED] Datedif not working in Excel 2013. Steps: Select the E5 cell first. DATEDIF function: This function returns the number of years, months, or days between two given dates. It doesn't appear in Insert Function list though. Step 3: Use the formula to calculate age in years, months, and days, similar to the Excel formula mentioned earlier. في حال كان التاريخ الأول 02-Sep-1 مدخل في الخلية A1، وكان التاريخ الأخير 03-Nov-30 مدخل في الخلية A3، فيمكن استخدام الصيغة الآتية لحساب الفرق بين عدد الأيام مع تجاهل السنوات بين التاريخين. When you type this formula, no help or suggestion will be shown. That will be cell B4 in this spreadsheet. For reasons unknown,. DATEVALUE function. Secondly, in cell E5 write the following formula. Bonjour,Hi all, I'm looking for some help with subtracting a range of dates, from another range of dates using datedif formula. DATEVALUE function. Here is the formula I used: =DATEDIF(A2,TODAY(),"Y") where A2 was the cell with the birth date. Upozorenje: Excel pruža funkciju DATEDIF kako bi podržao starije radne sveske iz programa Lotus 1-2-3. For example, look at the below data in an Excel worksheet. Rumus DATEDIF yang digunakan untuk menghitung selisih hari adalah =DATEDIF (start_date;end_date;"d"). DATEDIF เป็นฟังก์ชั่นที่ใช้หา ระยะห่าง ระหว่าง วัน 2 วัน. The NETWORKDAYS function calculates the number of workdays between two dates considering both weekends and holidays. Answer: If you are getting a negative answer, you have two ways to return a positive value. Như vậy, khi tính toán bạn sẽ dễ dàng chọn hàm giúp có được kết quả trả về chính xác nhất. DATEDIF value: =DATEDIF (D3,TODAY (),"Y")&". Excel 2013 Posts 13. To calculate the number of days, months or years between two dates in Excel, use the DATEDIF function. The DATEDIF function (Date + Dif) is a bit of an anomaly in Excel. DIATRABALHOTOTAL (NETWORKDAYS). DATEDIF returns #VALUE! I'm trying to use DATEDIF to calculate age to date but all I get is #VALUE!. Dates should be entered by using the DATE function, or as results of other formulas or functions. (you get the idea) Before I spend some. Need to know the number of years, months, or days between two dates? Excel's DATEDIF function will calculate it for you. The DATEDIF (Date + Dif) function is a "compatibility" function that comes from Lotus 1-2-3. fecha_finalización: Fecha de finalización que se considera en el cálculo. This function assumes that the weekend is on Saturday and Sunday. Multiply it with 60x60x24 and you get your 10 seconds. We have selected cell C2 in this case. Suppose the person’s date of birth is in cell A1 and the current date is in cell A2. Use the MONTH function to obtain the month value for each date, and then calculate the difference between the values. Step 2: Create a blank worksheet and add the table with date of births. 2. =DATEDIF (start,end,unit) Here's the info page at MS for a reference of the units. The Microsoft Excel DATEDIFF function returns the difference between two date values, based on the interval specified. This will bring up the Insert Function Window. Meski demikian, bukan berarti formula ini tidak tersedia atau tidak bisa digunakan. This step by step tutorial will help all levels of Excel users calculate the number of years between two dates. Just subtract one date from the other. Như bạn đã thấy ở trên, hàm DATEDIF tính toán chênh lệch giữa ngày bắt đầu và ngày kết thúc. จะคำนวนหาอายุใน Excel ใช้ฟังชั่นอะไรอะครับ ?? Microsoft Excel Microsoft Office. In A we have start date, in G end date, in C - when we had a meeting. Dates are stored as numbers, so whatever the outcome of your formula is, it will get displayed as the date that is as many days after 1 January 1900. A. Here's how it does this: First the DATE function creates the date, 5/1/2016. Kamu bisa menganggap DATEDIF sebagai rumus “tersembunyi” di excel karena kamu tidak akan mendapatkan saran penulisan dari excel ketika kamu mengetikkannya. Then the 1 represents the first day of that month. Check Difference option from the Type section;; In the Arguments input textboxes, select the cells which. Jadi, untuk menggunakan formula ini, kalian perlu mengetikkan secara manual pada cell yang dimaksud atau pada formula bar yang tersedia. INTL. First, confirm that =ISNUMBER(--C3) returns TRUE. برای این قسمت، از برگه “” DATEDIF در کتاب تمرین نمونه استفاده کنید. Finally, move the cursor down to the last data cell to get results according to the formula. Follow the steps to calculate the age using YEARFRAC():. Secondly, click on Visual Basic or press Alt + F11 to open the Visual Basic Editor. Let’s see the steps below. We are about to see a function not listed in any of the Excel formulas. I'm using =DATEDIF (A1,B1,"Y") Any help would be appreciated. If the date in the cell is more than 2 days of the target date, I want the cell to change color to Green. The difference with the Excel DATEDIF function. This function is useful in formulas where you need to calculate an age. Answer. The Excel YEARFRAC function returns the year fraction representing the number of whole. DATEDIF ensures that you're working with dates rather than date/times. The DATEADD function is a built-in function in Excel that is categorized as a Date/Time Function. Finally, move the cursor down to the last data cell to get results according to the formula. Ďalšie podrobnosti nájdete v tomto článku v časti o známych problémoch. Tải và cài đặt Office 2013 Sử dụng bản thấp hơn, các bạn có thể tải và cài đặt Office 2007. Calculate the difference between two dates. com, cara menghitung masa kerja di Excel diperlukan untuk melihat berapa lama karyawan bekerja di. 2 Answers. Now to add the days, the & operator has concatenated the result of the MOD function. W. Bonjour, Bien qu'elle soit cachée et non documenté, la fonction DATEDIF est disponible sur Excel 2016 Fais l'essai par exemple avec la formule : DATEDIF - DATEDIF Calculation returning a negative for days or months Hi all, I'm looking for some help with subtracting a range of dates, from another range of dates using datedif formula. I am unable to use conditional formatting as Excel says that relative formatting is not permitted within conditional formatting. Bạn có thể sử dụng hàm Datediff để xác định có bao nhiêu khoảng thời gian đã xác định tồn tại giữa hai ngày. Must be a reference to a cell containing a DATE , a function returning a DATE type, or a number. Upozornenie: Excel poskytuje funkciu DATEDIF na podporu starších zošitov z programu Lotus 1-2-3. DATEDIFF accepts either. DATEDIF takes 3 arguments: start date, end_date, and "unit", which controls which result is returned. As you can see, the result is 11 months. Returns the serial number of a particular date. 2. In reply to V_Agarwal's post on March 15, 2017. 「DATEDIF(デイトディフ)」という関数名は、「日付」の「DATE」と「差分」の「DIFFERENCE」を組み合わせたものであろうと思われます。. . There is no DATEIF function, I suspect that you want DATEDIF. Foto: Nada Shofura/kumparan. 按照函数日期与时间类别搜索→没有 2. DATEDIF - Hàm đếm số ngày, tháng, năm trong Excel 2007 2010 2013 2003. Term Definition; Date1: A scalar datetime value. The developer tab is mandatory on the Excel ribbon to start and write VBA macro. Funcția DATEDIF poate calcula rezultate incorecte în anumite scenarii. Solved by X. Example 3. 1. função. You will not find the DATEDIF function in the list of formulas in Excel. Una forma muy simple para trabajar con fechas. Lease_DaysInLastMonth = B3+1 - NewEndDate. The DATEDIF Function Returns the number of days, months or years between two dates. 1. . Use the DATEDIF function when you want to calculate the difference between two dates. MVP. Vypočíta počet dní, mesiacov alebo rokov medzi dvomi dátumami. Steps: Firstly, select the cell where you want the age. =DATEDIF(A3, B3, "ym") //difference in months, year component is ignored. Write down the formula as: “=DATEDIF (A2,B2,"y")”. You can use the following formula to calculate the number of years and months between two dates in Excel: =DATEDIF (A2, B2,"y")&" years "&DATEDIF (A2, B2,"ym")&" months". La fonction DATEDIF. The above formula contains two DATEDIF functions. Then, enter the following formula into a third cell: =DATEDIF (date1,date2,unit). Yes, you can use the DATEDIF function to calculate a person’s age. Formula for this unit is =DATEDIF (start_date, end_date,”ym”) So the given example shows the answer 6, as the difference between month # 7 and month # 1. น้อยลง. Example 1: To get the number of years between two dates: Enter or copy the below formula into a blank cell to get the number of complete years between two given dates. View Paid Training & BundlesExcel sees you are calculating with dates and thinks you want to display the result as a date as well. For a. Solved by O. A1 cell: 09/01/2012. Now it’s time to combine all these to create an accurate age. Se usa de la siguiente manera: DateDiff (Parametro, Fecha Inicial, Fecha Final, [Fecha Inicio Semana], [Fecha Inicio Año]) Donde: Parámetro: Permite definir qué es lo que se va a calcular, sea días,. Attention - ExcelForum Rules have been updated as of August 2023. Ngày tháng đầu tiên. You can vote as helpful, but you cannot reply or subscribe to this thread. Below is the formula that will do this: =DATEDIF (B2,C2,"y")&" Years "&DATEDIF (B2,C2,"ym")&" Months". Results diff. =DATEDIF([TODAY], [Created],"d") Calculated columns use Excel Formulas to calculate the result of the formula (few of the functions are available) You can read about calculated columns here: Calculated Field Formulas. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands. Click in the cell where you want the age to appear. Dates and times are stored together (dates are day counts, stored as the integer portion of the value; times are fraction of a day, stored with the day count as a decimal fraction). TheDate = InputBox ("Enter a date") Msg = "Days from today: " & DateDiff ("d", Now, TheDate) MsgBox Msg. M. Ďalšie podrobnosti nájdete v tomto článku v časti o známych problémoch. DATEDIFの解説。. Tentunya, cara ini cukup membantu pengguna Excel jika mendapati selisih hari antara dua tanggal yang cukup. In the Save As dialog, select ‘Publish Sheet’ and ‘Add Interactivity’. The formula should produce an integer and the cell format should be Custom [=1]0 "month";0 "months". Crack your knuckles because we have a few more ways to calculate the difference between two dates. Calculate Difference Between Two Dates Using DATEDIF Function. Others have found equivalent formulas although they should match DATEDIF, so if you don't like DATEDIF, you may need to. S response is good enough, you can also multiply what you are getting by 86400 (which is the result of 60*60*24, you just save some. in 25 mins. Click the insert function button (fx) under the formula toolbar; a dialog box will appear; type. Excel treats months as values (1 through 12), which makes it easy to subtract an earlier date from another date as long as both dates fall in the same year. I need to do the datedif function for every value from e2 to e151 and the amount of months from those dates to September 1 2013 with the values in j2 to j151 Solved by O. First put a start date in a cell, and an end date in another.