The VBA function DateDiff () is used to calculate the difference between two times:
Sub UhrzeitSubtrahieren()
ThisWorkbook.Worksheets("Tabelle1").Activate
Range("F3").Value = DateDiff("n", _
Range("F2").Value, Range("F1").Value)
Range("F3").NumberFormatLocal = "0"
End Sub
Die Funktion DateDiff() dient zum Berechnen der Differenz von zwei Zeitangaben (zweiter und dritter Parameter). Die Einheit der Zeitdifferenz wird im ersten Parameter angegeben. Dafür gibt es die gleichen Möglichkeiten wie bei DateAdd().
Calculate time difference with VBA in Microsoft Excel
Was the explanation to "Calculate time difference with VBA in Microsoft Excel"Helpful? Rate now:
More explanations too
- Portfolio analysis / BCG matrix
- Economic cycle
- Product life cycle
- Production factors (economics)
- Pricing strategies
- Matrix organization
- Organizational structure
- Multi-line system
- Legal transactions: form, nullity and contestability
- Economies of scale
- Accruals and deferrals
- Determination of sources of supply
- Process organization
- Staff line organization
- Pricing in the markets