Avatar of Connor Queen
Connor Queen

asked on 

Autofilling a numeric time code corresponding to a date?

Relative excel novice here, just learning proper vba script.

I have a work sheet with student scores across various competencies over time. I'm sorting the data
preparing ultimately to run a factor analyses / create a MTMM.

My sheet has 80,000 rows from all testing so the manual sort isn't going to work. I have the date at which each
student was tested but need to assign a number code (time 1, 2, 3 etc) for each student based on when their
first testing session was to their last. The issue is that when I autofill it does a series fill the whole way down or
just a straight copy. I need it to start back at 1 for each new student as it fills down the row i.e.:

Student    time
1                   1
1                   2
1                   3
2                   1
2                   2
2                   3
2                   4
n                  n

Problem being not all students were testing same number of times, there is lots of variance.

Any help is greatly appreciate, thank you very much.
Microsoft Excel

Avatar of undefined
Last Comment
Subodh Tiwari (Neeraj)

8/22/2022 - Mon