Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Extracting data please help

I need help please. I need to extract the following from the message
bellow:
1.the email
2.Postcode: SE55 2LN
3 This message has been scanned for viruses at Samuel and Sons Ltd. in
2000 cells.

Range("B2").Select

While ActiveCell.Value < ""

Str = ActiveCell.Value
'MsgBox ("") & Len(Str)
Cnt = 1
CntPart = 0
For x = 1 To Len(Str)
If Asc(Mid(Str, x, 1)) = 10 Or Asc(Mid(Str, x, 1)) = 13
Then
'MsgBox Asc(Mid(Str, X, 1))
'MsgBox CntPart
CntPart = CntPart + 1
Strparts(CntPart) = ""
'MsgBox Strparts(CntPart)
Else
'MsgBox Asc(Mid(Str, X, 1))
'MsgBox CntPart
Strparts(CntPart) = Strparts(CntPart) & Mid(Str, x, 1)
'MsgBox Strparts(CntPart)
End If
Next x



Worksheets("Report").Select
'Range("A1").Select


For Z = 1 To CntPart
ActiveCell.FormulaR1C1 = Strparts(Z)
ActiveCell.Offset(0, 1).Select
Next Z
ActiveCell.Offset(1, -(CntPart)).Select


For Each wkshts In Worksheets
If Left(wkshts.Name, 5) = "alert" Then
dataworksheetselect = wkshts.Name
End If
Next

Worksheets(dataworksheetselect).Select
ActiveCell.Offset(1, 0).Select

Wend
used the above code but it only loops through and does not return
anything


"A user has registered at www.XXXXXXXXXXXXXXXXX.com and took up the
option to be contacted by their local Business Link for occasional
updates. Their postcode showed that they are in the area covered by
you, so their email address is given below. We invite you to add them
to your email list, provided your emailing activities are in line with
our privacy policy at www.XXXXXXXXXXXXX.com/privacy and that every
email you send has instructions about how to unsubscribe from future
emails sent by you.



Postcode: SE55 2LN



This message has been scanned for viruses at Samuel and Sons Ltd.

"

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extracting data please help


If you run your code with the message boxes stetted out you will not ge
a return as your code does not specify a location to display any result
found, other than that is there some code missing?, what is to relate
to Strparts?

Regards,
Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=57171

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
extracting data from one sheet based on data in another - VLookup? des Excel Worksheet Functions 3 February 4th 09 07:27 PM
Extracting data Whit Excel Worksheet Functions 1 June 27th 08 02:18 PM
Extracting Data for .Txt Files By Unique Field Data La Excel Discussion (Misc queries) 3 July 17th 06 01:30 PM
extracting data mac_fixer Excel Programming 1 January 5th 06 10:24 AM
Extracting Data Gary Thomson Excel Programming 0 October 22nd 03 12:34 PM


All times are GMT +1. The time now is 01:26 PM.

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"