Truncating text files to extract only email addresses
Hello does anyone know a formula to extract just the email addresses from files with records as follows:
aaasilv@terra.com.br;85.72.201.151;Athens;Attiki;Greece;20/07/2015;Nao;Sim;;;;1430833559
aabmeneses@terra.com.br;187.90.44.115;Salvador;Bahia;Brazil;20/07/2015;Nao;Sim;;;;3143249011
I have a total of 25,000 records for this extraction so a truncation solution would be appreciated!
The text required for each of the records above is:
aaasilv@terra.com.br
aabmeneses@terra.com.br
Thanks
»
- Rushki1's blog
- Login or register to post comments
- 9513 reads
I can help you on this.
email - sujaldeshpande_77@yahoo.com
Here youa re this works
If you copy all your records in to column A of a worksheet, then run this macro
Sub emailstrip()
'find last entry in column A
s = Range("A26000").End(xlUp).Row
For x = 1 To s
' pick up a record in rec
rec = Cells(x, 1)
L = Len(rec)
For y = 1 To L
test = Mid(rec, y, 1)
If test = ";" Then
addr = Left(rec, y - 1)
'put addr in col k
Cells(x, 11) = addr
GoTo Nextx
End If
Next y
Nextx: Next x