Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
antieal
 
Posts: n/a
Default How do I delete duplicate entries in excel?

I have been given a large database in excel and need to distill it by
removing duplicate entries. I would like the results to be displayed in a
new worksheet so I won't lose the original data. I have a basic working
knowledge of excel but I can learn.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Ron Coderre
 
Posts: n/a
Default How do I delete duplicate entries in excel?

Here's an approach to try (it might seem a bit long, but it's really pretty
easy):

Example Assumptions:
Sheet1 contains your data in cells A1:Z100
Sheet2 is where you want the extracted data to be displayed
(of course, you'll need to adjust the range references to suit your situation)

Using Sheet2:

InsertNameDefine
Names in workbook: Sheet2!rngDest
Refers to: =Sheet2!$A$1:$Z$1

Next...still on Sheet2:
InsertNameDefine
Names in workbook: Sheet2!rngSource
Refers to: =Sheet1!$A$1:$Z$100

(Notice: you are on Sheet2, and creating a Sheet2 level range name, but
the referenced range is on Sheet1)

The reason: An advanced filter cannot SEND data to another sheet, but
it can PULL data from another sheet.

Now...set up the Advanced Data Filter:
DataFilterAdvanced Data Filter
Select: Copy to another location
Select: Unique Values
List Range: (press F3 and select rngSource)
Criteria Range: (leave this blank)
Copy To: (press the [F3] key and select rngDest)
Click [OK]

Note: if you want to run that Advanced Data Filter repeatedly,
you'll need to re-select rngSource each time
.....OR...if you're feeling a bit ambitious...

You can build a simple macro to automatically re-run the filter:
Press [Alt]+[F11] to open the VBA editor
Right click on the VBA Project folder for your workbook
Select: InsertModule

Then, copy/paste this code into that module:

'---Start of Code-------
Option Explicit
Sub PullMatchingData()
Range("Sheet2!rngSource").AdvancedFilter _
Action:=xlFilterCopy, _
CopyToRange:=Range("Sheet2!rngDest"), _
Unique:=True
End Sub
'---Start of Code-------

To run the code:
ToolsMacroMacros (or [Alt]+[F8])
Select and run: PullMatchingData


Does that help?

***********
Regards,
Ron


"antieal" wrote:

I have been given a large database in excel and need to distill it by
removing duplicate entries. I would like the results to be displayed in a
new worksheet so I won't lose the original data. I have a basic working
knowledge of excel but I can learn.

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
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
How do I delete duplicate records from an entire Excel workbook? Steven B. Excel Discussion (Misc queries) 0 December 6th 05 10:32 AM
How can I use find and replace to delete a word in Excel? callpaultwt Excel Discussion (Misc queries) 2 December 1st 05 09:11 PM
How can I delete rows from Pivot Tables in Excel 2000 as in 97 Rex at B$4U Excel Discussion (Misc queries) 0 April 18th 05 04:55 AM
Duplicate records in Excel Sheidsa Excel Discussion (Misc queries) 1 November 30th 04 12:23 AM


All times are GMT +1. The time now is 05:11 PM.

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"