welcome. i think columns R, T, and U contain dates and blank cells. try this.
Sub ddiff_vba()
Dim LR As Long, minD As Long, maxD As Long, strLTS As Long
Dim rLocation As Range
LR = Range("A" & Rows.Count).End(xlUp).Row
Set rLocation = Range("Z2:Z" & LR)
With rLocation
.FormulaR1C1 = "=IFERROR(ROUND(RC[-6]-RC[-8],0),0)"
.NumberFormat = "0"
.Offset(0, -1).FormulaR1C1 = "=RC[-4]-RC[-5]"
.Offset(0, -1).NumberFormat = "[h]:mm"
End With
Select Case Application.CountIf(rLocation, 0)
Case Is = rLocation.Cells.Count
strLTS = "not calculated"
Case 0
strLTS = Application.Max(rLocation)
Case Is < rLocation.Cells.Count
minD = Evaluate("=MIN(IF(" & Range("R2:R" & Range("A" & Rows.Count).End(xlUp).Row).Address & ">0," & Range("R2:R" & Range("A" & Rows.Count).End(xlUp).Row).Address & "))")
maxD = Application.Max(Range("T2:T" & Range("A" & Rows.Count).End(xlUp).Row))
strLTS = maxD - minD
End Select
MsgBox "MinDate: " & minD & " or " & Format(minD, "mm.dd.yyyy")
MsgBox "MaxDate: " & maxD & " or " & Format(maxD, "mm.dd.yyyy")
MsgBox "DaysDiff: " & strLTS
End Sub