We help IT Professionals succeed at work.

Convert Duration

Billa7
Billa7 asked
on
Hi Experts,

Please help create VBA to convert all "00:50" duration into "02:00" at column D. Attached the workbook.
Convert-Duration.xls
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Sub convertduration()
Dim cel As Range
For Each cel In Range("D2:D" & Range("D2").End(xlDown).Row)
If cel.Value = 50 / 24 / 60 Then cel = 2 / 24
cel.NumberFormat = "h:mm"
Next cel
End Sub

Author

Commented:
Hi ssaqibh,

Thanks

Explore More ContentExplore courses, solutions, and other research materials related to this topic.