Solved

Convert Duration

Posted on 2012-03-09
3
235 Views
Last Modified: 2012-03-09
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
Comment
Question by:Billa7
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 37702782
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
 

Author Closing Comment

by:Billa7
ID: 37702797
Hi ssaqibh,

Thanks
0
 

Author Comment

by:Billa7
ID: 37702893
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question