1. D

    DAX measure calculate sum of current and one previous month

    Hi, I'd like to write a measure to calculate the sum of the current and previous month totals, so Sum dec ; january, Sum January Febuary, Feb : March, in a nonth month ( Date) scenario I've used the the following; SPC:= VAR oneV = IF(HASONEVALUE(Table1[Date]),VALUES(Table1[Date])) VAR...
  2. T

    VBA Type Mismatch error

    Hi, there are three columns(open date, close date and months). I need to use VBA to automate date adding process. If there is a value in column A, I want to add column A and C together and put the result in column B. For example, in cell A2, I want to input date 6 months after 02/08/2021(cell...
  3. R

    DateAdd variable with Text Field

    Hi All, New to the group so be gentle. I've tinkered with Access for quite a while but I've come across something that I just can't get right. I've got a database of assets that have been surveyed, the survey is imported into the database and the various assets need reassessing within a set...
  4. D

    Set Due Date/Time using DateAdd exclude weekend and holiday

    Hello, Need help, i use DateAdd function in my Query, DateAdd("d",numberofdays,StartDate), however i need to exclude the weekend and holidays. Can you guide me on how i can do that. Thanks Regards, Den
  5. P

    DateAdd Not Working as Expected

    Basically I'm just trying to convert a date and time to a different time zone. Here is my code: dateString = Left(startcell.Offset(i, 0).Value, 10) & " " & Mid(startcell.Offset(i, 0).Value, 12, 5) dateofPeak = DateAdd("h", -7, DateTime.DateValue(dateString)) The dateString input is "2018-06-02...
  6. J

    DAX CALCULATE DATEADD only works for an interval of zero

    I'm receiving this error both in a larger data model and a simplified model. I have two tables in the data model, a 'quantity' table with a date column containing the first date of each month in a year and an associated quantity and a contiguous three-year 'calendar' table that extends a year...
  7. K

    Expiry date: Date in cell has expired over 3 years then...

    Hello, I have a code that displays a msgbox when it reaches the date +1. What I'm trying to do is get the code to display the message box if the date in column H9:H100 is over Now()+30 (Today + 30 days) and to continue displaying the expiry message (even after +30 days) until the date has...
  8. A

    Using DateAdd function in a update query to add 10 years to the date

    I have a table (tbl_transactions) which has a column(transaction_date) that holds dates in this format mm/dd/yyyy. The file that is imported has the wrong dates, shows 2005 instead of 2015. I need to run an update query to correct the dates by adding 10 years to each date in the...
  9. V

    Dateadd calculation VBA problems

    Hello, Have an question abort mycket dateadd function. X = 7 If DateAdd("h", 1, sheet1.cells(i, 6)) * 24 - x) > "" Then ... ... ... Can't get it work :(
  10. J

    Change <interval> enumeration in DATEADD, etc according to filter context

    Hello there, Does anyone know if there's any way to adjust the <interval> argument of functions like DATEADD according to filter context? The argument takes enumerations, not text strings or numbers that would be easily swapped with some IF logic. At the moment, I'm doing things like this...
  11. J

    Measures for Monthly Actuals using DATEADD

    I am trying to create measures with the DATEADD function for each month of the present year. I am doing this by passing a THISMONTH mueasures into the DATEADD to calculate how many time periods to step back to get each month. All future months will be "0" as there are actuals in future months...
  12. A

    Need help with VBA formatting of date

    Fairly new to using the more advanced features in excel and need help. What I have is a workbook with the daily schedule for several employees and at the end of each day I print the schedule in 3 different formats and then want to save the sheet by copying in and renaming it with the next work...
  13. S

    dateadd not working

    I want to have a user enter a date, and then have the system tell the user the next day's date. Dim rptdate As Date rptdate = Application.InputBox("Enter date.", Title:="Date Entry", Type:=1) MsgBox (DateAdd(d, 1, rptdate)) the msgbox line does not want to work but not sure how to...
  14. I

    date LastSixMonth

    Hiya, The following function pulls the A DayBefore of the Last Monday. DateAdd("d",-((DatePart("w",Now())-2)),Now()-8) = 03-July-2011 Problem Now I would like to use the same function and pull exact date of last 6month i.e. 03/01/2011? Thanks for you help! Regards FArhan...
  15. D

    One field to update based on two other fields data

    I want one field to update based on two other fields information User selects "status" and inserts "date" request was made, automated due date populates "due date" field in form. 14 and 1 are days...not months or years. Private Sub Date_AfterUpdate(Cancel As Integer) If Me.[Priority] =...
  16. I

    Calculate "LastFriday" date

    Hi The following function calculate the last "Monday" value in MS Access (SQL) but I would like to calculate the "last Friday" of the week and could some one go through how this fucntion work (break down) please. I need to get the understanding so in future I can do my self instead of...
  17. J


    I am trying to group records 3 ways in Visual Studio for an excel spreadsheet, by hour, week and month. I have currently have to break apart the date column with a dateadd statement, as my columns that have the times contain a unix date time. I need to make a new column with the dateadd and...
  18. N

    Unable to show previous years Volume (DLookup function)

    Hello everyone, This is the 3rd issue I am posting on this forum and have so far been extremely grateful with the quality and speed of responses. Here is my latest issue: I have a table, "Daily_Volume", that has 3 fields "LogDate" (dd/mm/yyyy), Volume (Currency), and RecordCount (Count of year...
  19. A

    DateAdd Help

    Hello, I am looking to create a macro that will look through column BJ which has a series of date in it. I need it to select any row that the cell in column BJ is 30 days before today then cut those selections. I am just gettting familiar with the DateAdd function, but it is taking some...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back