I have written the following routine that will convert the range that I've selected from Feet to MM. The problem is that I've found that there are a lot of ranges that have operators such as: <30 or 10 - 20 or >60. I need to parse this text so that the result is a string that has the same operators (<,>,-), but the numerical values are converted.
Examples:
"<30" returns "<9144"
"10 - 20" returns "3048 - 6096"
The numerical conversion:
Examples:
"<30" returns "<9144"
"10 - 20" returns "3048 - 6096"
The numerical conversion:
Code:
Public Sub Ft_to_mm()
Dim SelRange As Range
Dim C As Range
Set SelRange = Selection
For Each C In SelRange
If IsNumeric(C) And C <> "" Then 'Range contains a number to convert
C.Value = C.Value * 304.8
C.NumberFormat = "0"
Else 'Range contains <, >, -...
'break up the string
' "CODE HERE ?"
End If
Next
End Sub