View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MSP77079[_43_] MSP77079[_43_] is offline
external usenet poster
 
Posts: 1
Default Excel VBA Macro - parse data

I pasted the examples you gave into cells C5:C11

Sub test()

For i = 5 To 11
myText = Cells(i, "C")
myLen = Len(myText)
For n = 1 To myLen
If IsNumeric(Left(myText, n)) Then thisNum = Left(myText
n)
Next n
Cells(i, "F") = Format(thisNum, "$ #.00")
Next i


End Su

--
Message posted from http://www.ExcelForum.com