• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

Convert Duration

Hi Experts,

Please help create VBA to convert all "00:50" duration into "02:00" at column D. Attached the workbook.
Convert-Duration.xls
0
Billa7
Asked:
Billa7
  • 2
1 Solution
 
Saqib Husain, SyedEngineerCommented:
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
0
 
Billa7Author Commented:
Hi ssaqibh,

Thanks
0
 
Billa7Author Commented:
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now