Show number of an occurrence?

kruuth

New Member
Joined
Sep 1, 2009
Messages
35
Is there a way to show an occurrence number in excel with a list of data and dates? In this case I have a bunch of license plates, and dates. I sort on the dates. I'd like to have a third column that shows the number of times that plate has shown up prior to that date in the month so it looks like this:

License--Date--Occurence
XXX-XXX--5/1/11--1
AAA-AAA--5/1/11--1
XXX-XXX--5/5/11--2
BBB-BBB--5/6/11--1
XXX-XXX--5/12/11--3

Is there a way to do something like this?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Is there a way to show an occurrence number in excel with a list of data and dates? In this case I have a bunch of license plates, and dates. I sort on the dates. I'd like to have a third column that shows the number of times that plate has shown up prior to that date in the month so it looks like this:

License--Date--Occurence
XXX-XXX--5/1/11--1
AAA-AAA--5/1/11--1
XXX-XXX--5/5/11--2
BBB-BBB--5/6/11--1
XXX-XXX--5/12/11--3

Is there a way to do something like this?

In C2 enter & copy down:

=SUMPRODUCT(--($A$2:A2=A2),--($B$2:B2=B2))

If you are on 2007 or later, invoke

=COUNTIFS($A$2:A2,A2,$B$2:B2,B2)

instead.
 
Upvote 0
With your sorted, sample data in A1:B6
this regular formula increments the count of the referenced License value
Code:
C2: =COUNTIF(A$1:A2,A2)

Is that something you can work with?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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