View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
[email protected] ed@excelhelp.us is offline
external usenet poster
 
Posts: 3
Default How can I convert a character string that contains letters & numbers "£2,456.99 (including flights)" into a numeric?

A user defined function similar to the following will work

Public Function stripNumbers(rng As Range)

Dim i As Integer

For i = 1 To Len(rng.Value)

If Mid(rng.Value, i, 1) = "0" And Mid(rng.Value, i, 1) <= "9"
Then
strNum = strNum & Mid(rng.Value, i, 1)
End If

Next

stripNumbers = CDbl(strNum)

End Function

You can email me @ to request a copy.

Regards,
Eddie
http://www.ExcelHelp.us