Running Count of Value by Week

vintage18K

New Member
Joined
Sep 20, 2018
Messages
1
Hello- Thanks in advance for any assistance.

Looking to have a column in excel which calculates the number of times a name appears weekly in a data set over time and assigns an integer to the name.

The "Occurrence" column would auto populate the above target value.

I was using '= COUNTIF($A$1:$1,1)' and it was working fine but duplicates have started to occur weekly in the data which has thrown off the weekly count. In the below example Joe populated in March once and May two times. In the below example Joe would get a 1 assigned to him for the first month he occurred in March and a 2 assigned to each occurrence in May [My COUNTIF formula would have counted Joe's 3rd time in the column as a 3 when technically it should be listed as a 2 since its the 2nd week he populated]

Conditions: I cannot delete any of the data set.


DateValueOccurrence (Future state)
03.01.2018Joe1
03.01.2018Steve1
03.01.2018Paul1
05.08.2018Joe2
05.08.2018Joe2
05.08.2018Chris1
06.15.2018Chris2
06.15.2018Paul2
06.15.2018Paul2
07.22.2018Chris3
07.22.2018Joe3
07.22.2018Sam1

<tbody>
</tbody>
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi,

Try this:

Add another column (helper)

C2 =B2&WEEKNUM(A2)
D2 =COUNTIF($C$2:$C$13,C2)


ABCD
1DateValueHelperOccurrence
201/03/18JoeJoe91
301/03/18SteveSteve91
401/03/18PaulPaul91
508/05/18JoeJoe192
608/05/18JoeJoe192
708/05/18ChrisChris191
815/06/18ChrisChris241
915/06/18PaulPaul242
1015/06/18PaulPaul242
1122/07/18ChrisChris301
1222/07/18JoeJoe301
1322/07/18SamSam301

<colgroup><col span="4"><col></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,542
Messages
6,120,116
Members
448,945
Latest member
Vmanchoppy

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