Try this code:
Select the empty cell below the date column and run the macro.
The macro calculates the difference between the FIRST date and the LAST date in the cells above the empty cell you select and displays the difference in days.
![]()
Sub CalcDates() Dim rT As Range Dim rB As Range Set rT = ActiveCell.CurrentRegion.Cells(1) Set rB = ActiveCell.Offset(-1) With ActiveCell .Value = DateDiff("D", rT.Value, rB.Value) .NumberFormat = "General" End With End Sub
Bookmarks