
FORMULA TO ADD DAYS TO DATE IN EXCEL HOW TO
Also read: How to Get Month Name from Date in Excel Total Days Left in the Month Once I have the serial number, I used EOMONTH to get the last day of the month and then the DAY function to get the total number of days in that month.
FORMULA TO ADD DAYS TO DATE IN EXCEL SERIAL NUMBER
Since this is still a text string, I have used the DATEVALUE function to get the corresponding serial number for this date.

In our example, this part of the formula would give us “01-January-2023” in cell B2. Since we only have the month name, we have used “01-“&A2&”-“&YEAR(TODAY())) to first construct a date in a format that Excel recognizes as a proper date. Let me quickly explain how this formula works. Let me demonstrate how it works by using an example.īelow I have a data set where I have the dates in column A, and I want to get the total number of days in each month. This works as date values are stored as numeric values in the back end. In this case, we calculate the last day of the month for the given month and the previous month and then simply subtract the two values. Note: In case you want to get the total number of days in the previous month or the next month, you can change the second argument of the EOMONTH function (use -1 for the previous month and 1 for the next month) Also read: How to Get the First Day of the Month in Excel Get Total Days In a Month Using EOMONTH FunctionĪnother fast way to get the total number of days In a month is by using two EOMONTH functions with the subtraction operator. The DAY function then gives us the day value of the last date of the month, which would essentially be the total number of days in the month. Note that the second argument in the EOMONTH function needs to be 0 as we need the last day date for the same month.įor example, when the date is 1, the EOMONTH function would give us 3 (which is the last day of June 2024). The EOMONTH function (where EO stands for End Of) takes the date in the cell as the input and then gives the last day of that month.

Now let me quickly explain how this formula works.
