Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Counting of Unique records from Repeative nos

  Asked By: Kehkashan    Date: Jan 01    Category: MS Office    Views: 839
  

I have a column of custoer code in spreadsheet, in
which, many numbers are duplicate or repeating. I want
to know how many customer are exist in this column.


Can anyone help me, how can i count these customer
nos.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Madeeha Malik     Answered 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

 
Answer #2    Answered By: Aaminah Khan     Answered On: Jan 01

You can use following steps of extracting unique  records:

Go to Data
Select Adavanced Filter
Select Copy to another Location
In List Range Select Column A
in Copy to Select G1
Check Unique Record
Press OK

You should have Customer code  in Column A.

 
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: