datediff

  1. M

    Adding DateDiff Values

    RE: Time tracking application, or at least my attempt at one. I need to calculate the total number of hours that a person was present. Very similar to punching a clock. I have two sets of dates/times that are added via a timestamp function. I have two DateDiff functions set up in an array to...
  2. S

    Using DATEDIF in a SUMPRODUCT formula with blank cells

    Hello all, I do a lot of work in Excel for my company's home visiting programs, which requires a lot of grant reporting and summaries. I'm trying to create a formula that will make my life easier in that regard. One of the requirements for grant reporting is reporting on how many clients were...
  3. J

    Date Difference

    I am sure this can be done, but I am not able to find anything specifically addressing it. Is there a way to create a DateDiff parameter in a query, where is it calculating the days, between current date and a date field within the table the query is built from?
  4. K

    DateDiff gives Type mismatch error 13?

    Hey all, I have this neat little macro that runs on every start of a sheet. It's (supposed to be) pretty simple, checking for rows that are older than 180 days and then deleting part of the content of the row. My boss was so happy over this GDPR-compliant macro. :rolleyes: But then a few days...
  5. B

    Hide rows based on Datediff

    I need some help combining both. I have two cells where dates are entered, so if the difference between both dates is greater than 6 months then rows 71:73 unhide......
  6. E

    showing number of days apart from today

    I am updating a table for a production schedule and I want to automatically tell how many days away an order is due from today without looking at the dates and counting. Is there something that can do this while still keeping the date as well? Jan 1, 2018 - 9 Jan 10, 2018 - Today...
  7. D

    VBA subtracting times using DTPicker

    Hey all, Another new guy question here. I'm trying to create a UserForm for people to enter information that includes a DTPicker that will be saved in a worksheet. What I'm trying to do is use the values of the DTPicker to get the total time between the two inputs, in total hours. I am trying...
  8. F

    VBA script doesn't update todays date

    I posted a similiar question earlier, but it was difficult to understand what my exact questions were. So here goes another try: This is my worksheet: Sub Worksheet_Change(ByVal Target As Range) ' Activate the date when I set case as "Active" If Not Application.Intersect(Target...
  9. F

    VBA script doesn't update todays date

    I want to calculate the number of days until deadline. Column G15:G1000 is set as the deadline date. I have a similiar code in a worksheet_change script, and it works fine. Also, I'm relatively new to the whole "VBA experience", and haven't really used Workbook_Open() before.:) Sub...
  10. L

    DateDiff no longer works with interval parameters

    Hi all I recently realised a DateDiff calculation error in a workbook I have been using for years and found an error. I checked old copies of the same workbook and found the calculated data to be correct, so I am pretty sure the same formula used to work for me. But then even when I ran the old...
  11. G

    Wookbook_Open Message Giving Count of Records not Closed for More than Specified Number of Days

    Hi all, I am trying to add a code so that when a user opens his/her workbook he/she gets a message with the number of records opened 30 days or more with a close date. The open date is in column C and the close date is in column AA. I tried the following (which is not working): Private Sub...
  12. C

    Question on using DateDiff in a query with more than one criteria

    Employee Hire & Termination Dates Rick worked from 08/07/13 until 12/07/13 Jane worked from 02/03/14 until 09/03/14 Tom worked from 08/01/14 until 09/01/14 My report needs to reflect the number of weeks each employee worked between specific dates, 08/28/13 through 08/28/14. I know that I...
  13. R

    Need help with VBA code in datediff

    Hi Guys - I am currently working on a small project , currently using two dates to be entered by user and wants the date difference to in "months". However i am getting the output in "days" not able to figure out the VBA code to handle output in months. My VBA Code - Sub test() Dim DateStr1...
  14. T

    DateDiff in VBA

    Hi, Having trouble getting the following code to run. Any thoughts ? I'd like to call the function only if a dates exist within any one row of the ranges within columns D or E? Is this possible ? ------------------------------------------------- Sub TimeReg() Dim StartDate As Range Dim EndDate...
  15. R

    Counting number of rows where datediff of two columns meet criteria

    I have a range of data and need to summarize some of the data. In the table below is an example of the data. I would like to have a single formula where I can count the number of rows where the end date - start date is < 14 days. I would prefer not to add an additional column for the datediff...
  16. R

    User Input Vs Static Value in DateDiff Criteria

    While I have been able to resolve just about everything through the genious guidance of the fine minds on this forum, I just cannot resolve, nor find a solution to this seemingly simple issue: I am trying to allow the user to specify the 'age' of a record to obtain a list of aged loans. I have...
  17. P

    datedif count down before or after today

    Hi, I have a list of service dates the can be either a future date or a past date? I want to reference the today function and look at the list of dates and tell me how many months have passed between the two dates.i would like it to show say 30 months to go till next service or -30 because it...
  18. A

    Datediff with a difference (Not sure its possible)

    I would like to calculate the time diffrence between 2 dates in DD/MM/YYYY HH:MM format which is easy enough. Howver I need to apply this agains a service delivery model: e.g. date 1 is 01/12/2010 09:00 and date 2 is 02/12/2010 09:00 so the diffrence is 24:00 hrs What I need to take into...
  19. A

    Timediff with a difference

    <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/>...
  20. E

    Help With DateDiff

    Hi, I am not sure if DateDiff can do this. The code below give me 7. But I want the answer to include only full months - not partial months. I know that can be done in Excel using the Datedif, but not sure if it is possible using the VB Datediff. So I would like 6 to be the answer below...

Some videos you may like

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top