MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Public Function Time2Num(A As String) As Double
Dim d As Integer, h As Integer, m As Integer
Dim s As String, i As Integer, l As Integer
Dim t As String
d = 0
h = 0
m = 0
Time2Num = 0
i = Len(A)
Do While i > 0
t = LCase(Mid(A, i, 1))
If t <> "m" And t <> "h" And t <> "d" Then Exit Do
i = i - 1
s = ""
Do While Mid(A, i, 1) <> " "
s = Mid(A, i, 1) & s
i = i - 1
If i = 0 Then Exit Do
Loop
i = i - 1
If t = "m" Then Time2Num = Time2Num + CInt(s) / 60
If t = "h" Then Time2Num = Time2Num + CInt(s)
If t = "d" Then Time2Num = Time2Num + CInt(s) * 8.4
Loop
End Function
convertDaysToDaysCount.xls
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
Excel lookup tables & values | 7 | 24 | |
Excel cell formatting | 5 | 27 | |
Excel calculate based on 'x' in column | 2 | 22 | |
Excel file that does not ask to be saved before exiting | 6 | 18 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
14 Experts available now in Live!