Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pull email addresses from SS, by domain, into CSV format.

TIA for any help.

I have a SS of 1500 email addresses, all in the second column of a
five-column worksheet. I would like to pull a copy of all email
addresses which have domains that begin with the letter "e", for
example, out of the column and into a new file in Comma Separated
Value format. (So if there happens to be 25 email addresses in the SS
with domains that begin with the letter "e", then in my new CSV file
would have them all -- ,
, etc.)

What's the best way to go about this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default Pull email addresses from SS, by domain, into CSV format.

Frank wrote:
I have a SS of 1500 email addresses, all in the second column of a
five-column worksheet. I would like to pull a copy of all email
addresses which have domains that begin with the letter "e", for
example, out of the column and into a new file in Comma Separated
Value format.

Sounds like a job for custom autofilter.
Data / AutoFilter
Click the arrow at the top of column 2 and select custom
In the first dropdown select "contains". In the second dropdown enter
"@e" without the quotes and click OK

Then edit copy column 2 of the table and you will just get the visible
data. Paste into a new worksheet and save as csv.

If you wanted to do that for each letter of the alphabet you could
write a macro which might be something like this

Dim I as Integer
With Range("A1").CurrentRegion
.AutoFilter
For I = 1 To 26
.AutoFilter 2, "*@" & Char(Asc("a")+i-1) & "*"
WorkBooks.Add xlWorksheet
.Columns(2).Copy Range("A1")
ActiveSheet.SaveAs "Address" & Char(Asc("a")+i-1) & ".csv",
FileFormat:=xlCSV
ActiveWorkbook.Close False
Next I
.AutoFilter
End With

End With


Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pull email addresses from SS, by domain, into CSV format.

Bill Manville wrote in message ...
Frank wrote:
I have a SS of 1500 email addresses, all in the second column of a
five-column worksheet. I would like to pull a copy of all email
addresses which have domains that begin with the letter "e", for
example, out of the column and into a new file in Comma Separated
Value format.

Sounds like a job for custom autofilter.
Data / AutoFilter
Click the arrow at the top of column 2 and select custom
In the first dropdown select "contains". In the second dropdown enter
"@e" without the quotes and click OK

Then edit copy column 2 of the table and you will just get the visible
data. Paste into a new worksheet and save as csv.

If you wanted to do that for each letter of the alphabet you could
write a macro which might be something like this

Dim I as Integer
With Range("A1").CurrentRegion
.AutoFilter
For I = 1 To 26
.AutoFilter 2, "*@" & Char(Asc("a")+i-1) & "*"
WorkBooks.Add xlWorksheet
.Columns(2).Copy Range("A1")
ActiveSheet.SaveAs "Address" & Char(Asc("a")+i-1) & ".csv",
FileFormat:=xlCSV
ActiveWorkbook.Close False
Next I
.AutoFilter
End With

End With


Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup


That did it! Thank you, Bill.
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
Email addresses in Excel need to format for mass email Boomer Excel Worksheet Functions 1 June 9th 06 01:46 PM
Format email addresses Unknown Excel Discussion (Misc queries) 5 November 27th 05 01:44 AM
How do you sort a column of email addresses by domain name in Exc. Andy R Excel Discussion (Misc queries) 5 December 10th 04 09:26 PM


All times are GMT +1. The time now is 01:40 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"