doesn't recognize fraction in string as numeric
I hacked my way through this using:
Private Function FractionToNumeric(strToConvert As String) As Double
Dim intNumerator As Integer, intDenominator As Integer,
intSlashLocation As Integer
intSlashLocation = InStr(1, strToConvert, "/", vbTextCompare)
If intSlashLocation 0 Then
intNumerator = Left(strToConvert, intSlashLocation - 1)
intDenominator = Right(strToConvert, Len(strToConvert) -
intSlashLocation)
FractionToNumeric = intNumerator / intDenominator
End If
End Function
But it still seems like there should be an easier way to do this. I
feel like I must be reinventing the wheel here ....
|