Hi,
I have different values in "A" Column duplicates also. I have to get the count of value in A2 from A2:A100 in B2, then count of value in A3 from A3:A100 in B3,,,
count of value in A20 from A20:A100 in B20 and so on.
I worked on it with my code but some error is there I can't find.
Please help....
Dim i As Long
Dim lastusedrow As Long
lastusedrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lastusedrow
cells(I,"B")=application.WorksheetFunction.CountIf(Range("A"&i&":A"& lastusedrow),"A"&i)
Next I
Thanks & regards,
Satish R Lakra
I have different values in "A" Column duplicates also. I have to get the count of value in A2 from A2:A100 in B2, then count of value in A3 from A3:A100 in B3,,,
count of value in A20 from A20:A100 in B20 and so on.
I worked on it with my code but some error is there I can't find.
Please help....
Dim i As Long
Dim lastusedrow As Long
lastusedrow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lastusedrow
cells(I,"B")=application.WorksheetFunction.CountIf(Range("A"&i&":A"& lastusedrow),"A"&i)
Next I
Thanks & regards,
Satish R Lakra
Last edited: