Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Add in for removing duplicate rows?

Is there an add in available (free - stretching it I know!) for
removing duplicate rows except for the first occurance.

Thanks
Tony

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add in for removing duplicate rows?

There may be one, but you really can handle it on your own. See Chip
Pearson's page on this for ideas:

http://www.cpearson.com/excel/duplicat.htm

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Is there an add in available (free - stretching it I know!) for
removing duplicate rows except for the first occurance.

Thanks
Tony



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Add in for removing duplicate rows?

Not that I know of, but if you give us the duplication criteria, I am sure
that we could knock something up pretty quickly.

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
oups.com...
Is there an add in available (free - stretching it I know!) for
removing duplicate rows except for the first occurance.

Thanks
Tony



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add in for removing duplicate rows?


Wrote:
Is there an add in available (free - stretching it I know!) for
removing duplicate rows except for the first occurance.

Thanks
Tony


10 For uY = 1 To 6 'Spin thru 6 times to get them all
20 Qq = Application.CountA(ActiveSheet.Range("A:A")) 'Get row coun
before beginning
30 For oZ = 2 To Qq 'Main loop
40 If Cells(oZ, 1) = Cells(oZ - 1, 1) Then 'Check for dups
50 Cells(oZ, 1).Select 'Select the cell
60 Selection.Delete Shift:=xlUp 'Delete
70 Qq = Qq - 1 'Change loop criteria because cell gone
80 End If 'End
90 Next oZ 'Inside loop
100 Next uY 'Outside loop

Have only added line numbers to explain

This will take any amount of rows but only checks column "A"
Line numbers 50 & 60 select and delete the duplicated data in colum
"A" only.
If you want it to delete data across the columns then you will need t
add more lines.

Example
' This deletes data in column "B"
Cells(oZ, 2).Select 'Select the cell
Selection.Delete Shift:=xlUp 'Delete
' This deletes data in column "C"
Cells(oZ, 3).Select 'Select the cell
60 Selection.Delete Shift:=xlUp 'Delete
' This deletes data in column "D"
Cells(oZ, 4).Select 'Select the cell
60 Selection.Delete Shift:=xlUp 'Delete
etc

Hope this help

--
grahamma
-----------------------------------------------------------------------
grahammal's Profile:
http://www.excelforum.com/member.php...fo&userid=2033
View this thread: http://www.excelforum.com/showthread.php?threadid=48483

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
removing duplicate rows exceluser2 Excel Discussion (Misc queries) 1 March 2nd 06 09:01 AM
removing duplicate rows exceluser2 Excel Discussion (Misc queries) 3 March 2nd 06 01:51 AM
Removing Duplicate Rows bvinternet Excel Discussion (Misc queries) 1 July 23rd 05 09:26 PM
removing duplicate rows neowok[_82_] Excel Programming 1 November 17th 04 03:45 PM
removing duplicate rows dan graziano Excel Programming 1 September 25th 04 12:16 PM


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