#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 32
Default Find and delete

Hi, have a workbook with 2 spreadsheets, first one is the master list (with
unique references), second one is an extract (containing duplicated data).
Can anyone help me with a way of looking at the unique references on sheet 2,
finding the duplicate reference on sheet 1 and deleting the row from sheet 1??
Any help much appreciated
Philip

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,090
Default Find and delete

Philip
Is "Sheet 2" the "Master" list?
What column(s) do you want to look at to determine if the listings are the
same? Do you want to delete from the Master list or from the other sheet?
HTH Otto
"Philip Drury" wrote in message
...
Hi, have a workbook with 2 spreadsheets, first one is the master list
(with
unique references), second one is an extract (containing duplicated data).
Can anyone help me with a way of looking at the unique references on sheet
2,
finding the duplicate reference on sheet 1 and deleting the row from sheet
1??
Any help much appreciated
Philip



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 32
Default Find and delete

Sheet 1 is the Master list (of accounts), sheet 2 is the list of paid
accounts - these rows need to be removed from the Master list (sheet 1). The
column with the the unique references is J on both sheets.
Thanks
Philip

"Otto Moehrbach" wrote:

Philip
Is "Sheet 2" the "Master" list?
What column(s) do you want to look at to determine if the listings are the
same? Do you want to delete from the Master list or from the other sheet?
HTH Otto
"Philip Drury" wrote in message
...
Hi, have a workbook with 2 spreadsheets, first one is the master list
(with
unique references), second one is an extract (containing duplicated data).
Can anyone help me with a way of looking at the unique references on sheet
2,
finding the duplicate reference on sheet 1 and deleting the row from sheet
1??
Any help much appreciated
Philip




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,090
Default Find and delete

Philip
This macro should do what you want. Note that I chose to name your
Sheet1 "One" and your Sheet 2 "Two". I assumed that your data started in
row 2. Change these parameters to suit your data. HTH Otto
Sub DeleteDupRows()
Dim RngJSht2 As Range
Dim RngJSht1 As Range
Dim i As Range
Application.ScreenUpdating = False
Sheets("Two").Select
Set RngJSht2 = Range("J2", Range("J" & Rows.Count).End(xlUp))
With Sheets("One")
Set RngJSht1 = .Range("J2", .Range("J" & Rows.Count).End(xlUp))
End With
For Each i In RngJSht2
On Error Resume Next
RngJSht1.Find(What:=i.Value,
LookAt:=xlWhole).EntireRow.Delete
On Error GoTo 0
Next i
Application.ScreenUpdating = True
End Sub

"Philip Drury" wrote in message
...
Sheet 1 is the Master list (of accounts), sheet 2 is the list of paid
accounts - these rows need to be removed from the Master list (sheet 1).
The
column with the the unique references is J on both sheets.
Thanks
Philip

"Otto Moehrbach" wrote:

Philip
Is "Sheet 2" the "Master" list?
What column(s) do you want to look at to determine if the listings are
the
same? Do you want to delete from the Master list or from the other
sheet?
HTH Otto
"Philip Drury" wrote in message
...
Hi, have a workbook with 2 spreadsheets, first one is the master list
(with
unique references), second one is an extract (containing duplicated
data).
Can anyone help me with a way of looking at the unique references on
sheet
2,
finding the duplicate reference on sheet 1 and deleting the row from
sheet
1??
Any help much appreciated
Philip






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
Find and delete! Philip Drury Excel Discussion (Misc queries) 0 October 3rd 07 02:36 PM
Find and Delete Karen[_2_] Excel Worksheet Functions 2 June 19th 07 11:04 PM
find a value and delete that row TUNGANA KURMA RAJU Excel Discussion (Misc queries) 11 January 29th 07 09:50 AM
find row and delete Native Excel Discussion (Misc queries) 2 February 2nd 05 09:46 PM
Find delete Jean-Francois Excel Discussion (Misc queries) 3 January 11th 05 05:25 PM


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