» Calculations with one thousandth fractions of seconds by Custom Function using VBA
CATEGORY - Printing in VBA
VERSION - All Microsoft Excel Versions
are to be done
Answer: Insert the following code in the appropriate modules. With the following user defined function. syntax: =spectime(A1)
Place the code below into the standard module
Function SpecTime(txt As String)
Const DIV As Long = 86400
Dim dblValue As Double
dblValue = CInt(Right(txt, 4)) / (DIV * 10000)
dblValue = dblValue + CInt(Mid(txt, 4, 2)) / DIV
dblValue = dblValue + CInt(Left(txt, 2)) / (DIV / 60)
SpecTime= dblValue
End Function
Book Store:
Recommended Books:
- A Mathematician Plays the Stock Market
- Guide to Financial Reporting and Analysis
- Learn MS Excel 2002 VBA/XML Programming
- Investing in Real Estate, Fourth Edition
- Microsoft Office Xp: Advanced Concepts and Techniques: Word 2002, Excel 2002, Access 2002, Powerpoint 2002
- The McGraw-Hill 36-Hour Course in Finance for Nonfinancial Managers
No comments have been submitted.

