Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA Macro - parse data
Hello
I need help on very simple Excel question. I have excel file exported from quickbooks which has buying cos column: Here is some sample data $0.04 $1.50 $1.135 $0.445*04 $0.01*EX $0.02(some text) $0.063 ES I want to get only cost ( means I want to delete the strings after "*", "(" , or space ). Thank you in advance for your help!!! Jaso -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA Macro - parse data
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Parse row data in Excel | Excel Discussion (Misc queries) | |||
How to parse data | Excel Discussion (Misc queries) | |||
How to parse data | Excel Discussion (Misc queries) | |||
Parse raw data | Excel Programming | |||
REQ: Simplest way to parse (read) HTML formatted data in via Excel VBA (or VB6) | Excel Programming |