Count Unique Data VB or Formula

Tchase01

New Member
Joined
Nov 2, 2016
Messages
2
I am having trouble finding a formula or VB macro to Count a Unique value in Column A and put the count in column C count them down until it finds another unique value in column A and starts the count over again etc...
Windows 7 Office 2013


Columns
A B C
2003 243 1
2003 243 2
2003 243 3
1902 492 1
1902 492 2
1902 492 3
1902 492 4
0901 492 1
0901 492 2
0901 492 3
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Welcome to the forum.

Try this:

ABC
1Column AColumn B
220032431
320032432
420032433
519024921
619024922
719024923
819024924
99014921
109014922
119014923
12

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet5

Worksheet Formulas
CellFormula
C2=IF(AND(A2=A1,B2=B1),C1+1,1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Put the formula in C2, then copy down. Let me know if this works.
 
Upvote 0

Forum statistics

Threads
1,215,416
Messages
6,124,774
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top