Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA Macro - parse data

Thank you very much, it worked perfectly!!

Jaso

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse row data in Excel [email protected] Excel Discussion (Misc queries) 0 April 3rd 08 08:53 PM
How to parse data bdwood Excel Discussion (Misc queries) 1 August 17th 06 08:36 PM
How to parse data Dave F Excel Discussion (Misc queries) 0 August 17th 06 07:32 PM
Parse raw data Larry[_11_] Excel Programming 3 October 23rd 03 07:48 PM
REQ: Simplest way to parse (read) HTML formatted data in via Excel VBA (or VB6) Steve[_29_] Excel Programming 3 August 25th 03 10:43 PM


All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"