The out will be displayed according to the date format settings on your system.in So it will count the holidays even you use weekdays. If you use weekdays interval” w” it will work similarly to the interval day “d” since the weekday calculates 1=Sunday, 2=Monday, etc.The interval and date mentioned in the formula will be given within a double quotation.The result after subtracting three weeks from the given date is displayed below.The formula is applied and the result is stored in currentdate.‘-3’ indicates the subtraction “ww” is the interval since we want to operate on weeks. To subtract three weeks from ‘’ will apply the formula.Currentdate is a variable as date type to assign the final result.
Define a variable to store the result.DateAdd (interval, - number, date)īy using the above method will try to find the day subtracting three weeks from ‘’ For example, change the formula as below. To perform subtraction, use these numbers as negative integers. The numbers specified as positive integers along with the formula. Similar to addition, subtraction can also perform using VBA DateAdd function.
The result will be shown with time in hh:mm:ss.Įxample #8 – How to Subtract Weeks using VBA DateAdd Function?.
You can download this VBA DateAdd Excel Template here – VBA DateAdd Excel Template Example #1 – Add Date