Forum Discussion
Goran1617
Jan 23, 2024Copper Contributor
DAYS function - How to include start and end date
I cannot seem to find the correct addition to the "DAYS(end; date; start_date)"- function.
I'm only receiving the days in between, so one day is missing in the total count.
Any suggestions?
ratishkp You can assign this to a shape or button:
Sub foo()
ActiveWorkbook.RefreshAll
End Sub
Or if the PivotTable is on another sheet, you can add ActiveWorbook.RefreshAll to the Worksheet_Activate event, and it will automatically update whenever the sheet is selected.
2 Replies
Sort By
- Riny_van_EekelenPlatinum Contributor
Goran1617 Well, that how the DAYS function works by design. If you want the extra day just add +1 to your formula.
- Goran1617Copper ContributorThank you! It works now. It was giving me a strange looking result earlier, but I realise that I had forgotten to format the field to "Number".