Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default subtracting one csv file from another

Hi there.

I have not been able to find a solution to this because it's hard to
know what to call what I want to do . ..

I commonly need to remove a list of records in a csv file from another
csv file.

The application is email marketing; if I need to send a reminder email
for an event, I want to remove all the people that have already
registered from the master list first.

So if I have a csv file with 25,000 odd records in it, and another
with 125 say, how can I find these 125 records in the master list so I
can delete them?

All suggestions greatly appreciated!

If there is a function or application or macro that does this, please
point me in the right direction

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default subtracting one csv file from another

Assuming both CSV files are opened in Excel


Sub RemoveRegistered()

RegisterRowCount = 1
With Workbooks("Register.csv").Sheets("Sheet1")
Do While .Range("A" & RegisterRowCount) < ""
Emailaddr = .Range("A" & RegisterRowCount)

With Workbooks("Master.csv").Sheets("Sheet1")
Set c = .Columns("A:A").Find(what:=Emailaddr, _
LookIn:=xlValues)
If Not c Is Nothing Then
c.EntireRow.Delete
End If
End With
RegisterRowCount = RegisterRowCount + 1
Loop
End With

End Sub

"generate" wrote:

Hi there.

I have not been able to find a solution to this because it's hard to
know what to call what I want to do . ..

I commonly need to remove a list of records in a csv file from another
csv file.

The application is email marketing; if I need to send a reminder email
for an event, I want to remove all the people that have already
registered from the master list first.

So if I have a csv file with 25,000 odd records in it, and another
with 125 say, how can I find these 125 records in the master list so I
can delete them?

All suggestions greatly appreciated!

If there is a function or application or macro that does this, please
point me in the right direction

thanks

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
Subtracting A from B Sibbs Excel Discussion (Misc queries) 4 March 3rd 08 07:57 PM
Subtracting JS Excel Worksheet Functions 1 March 9th 07 05:48 PM
Subtracting petrino Charts and Charting in Excel 2 January 9th 07 08:56 AM
Subtracting Josh Davis Excel Discussion (Misc queries) 3 June 16th 06 06:54 PM
Subtracting One Sum From Another R. U. Sirius New Users to Excel 3 September 27th 05 06:47 PM


All times are GMT +1. The time now is 01:39 AM.

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

About Us

"It's about Microsoft Excel"