View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
jlclyde jlclyde is offline
external usenet poster
 
Posts: 410
Default String Fractions Convert to Numbers VBA

I have items like 4 7/8 X 7 in a cell. I am trying to put together a
function to multiply the two numbers together. I can do this with
normal functions in Excl but I would like a function to do this job.
So I would like this to return 34.125. Here is the code I have.

Any help is appreciated,
Jay

Private Function FCArea() As String
Dim Fnd As String
Dim L As String, R As String, x As Integer

Fnd = Range("B:B").Find(What:="Final Size:").Offset(2, 0).Value

x = InStr(1, Fnd, "X", 1)

L = Left(Fnd, x - 1)
R = Right(Fnd, Len(Fnd) - x)
FCArea = L * R


End Function