Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 304
Default Remove duplicat entry w/out deleting cell

Hello all,
I'm looking to clear infomation from colums a-g when they are duplicates.
Data is listed from A1-N877.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Remove duplicat entry w/out deleting cell

Hi there,

In Excel2003 If have created the macro below.
It loops thru row 2 upto 877 and for each row it look of al values in
the row are present in one of the rows above the one currently check.

Remark:
It takes a while to run this macro.

Sub pgarcia()
Dim iRow1 As Integer
Dim iRow2 As Integer
Dim iCol As Integer
Dim iDup As Integer
Dim rCol As Range
Dim lVal As Long
Dim iStart As Integer

iStart = 2
' Start with second data row
' With 1 row of headers use 3
For iRow1 = iStart To 877
Range(Cells(iRow1, 1), Cells(iRow1, 7)).Select
For iRow2 = iStart - 1 To iRow1 - 1
iDup = 0
For iCol = 1 To 14 ' A - N
If Cells(iRow1, iCol).Value = _
Cells(iRow2, iCol).Value Then
iDup = iDup + 1
End If
Next
If iDup = 7 Then
Exit For
End If
Next

If iDup = 7 Then
Selection.ClearContents
End If
Next
Cells(1, 1).Select
End Sub

HTH,

Wouter
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
extract duplicat values adeel via OfficeKB.com Excel Discussion (Misc queries) 1 November 10th 09 07:48 PM
Deleting an unwanted AutoComplete entry Arlene Excel Discussion (Misc queries) 6 November 7th 06 04:23 AM
Macro to move info and delete duplicat records Bob Kopp Excel Programming 9 December 23rd 05 08:01 PM
Deleting an entry from a ini file vqthomf Excel Programming 1 September 7th 05 04:06 PM
Jump to duplicat entries Bud[_2_] Excel Programming 1 November 23rd 03 10:26 PM


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