Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Kehkashan Malik   on Jan 01 In MS Office Category.

  
Question Answered By: Madeeha Malik   on Jan 01

you can use the following code, provided that the repeating data is in the first
column.
the code  will delete the repeating records, leaving all unique.
you may also use pivot table.

Sub deletedublicate()

Dim Satýr As Double, satýr2 As Double
Dim sutun As Double, sutun2 As Double
Dim hucredeger As Double, hucredeger2 As Double
Dim currentcell As Range


Set currentcell = ActiveSheet.Range("A1")
ActiveSheet.Range("A1").Sort _
Key1:=ActiveSheet.Range("A1")
Do While Not IsEmpty(currentcell)
Set nextcell = currentcell.Offset(1, 0)
If nextcell.Value = currentcell.Value Then
currentcell.EntireRow.Delete
End If
Set currentcell = nextcell
Loop


End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Counting of Unique records from Repeative nos Or get search suggestion and latest updates.


Tagged: