I want to count the number of consecutive c's under the Absent Flag BUT after EACH incident of the y. I'm thinking I want to reset after each grouped ID# and after each incident of y. I'M STUCK! How do I do this??
ID# 111
Date Absent Flag
Mar 1 y
May 10 y
May 11 c
May 12 c
Sept 3 y
ID# 112
Date Absent Flag
Jan 3 y
Jan 4 c
Jan 5 c
Jan 6 c
April 28 y
April 29 c
April 30 c
ID# 113
Date Absent Flag
Feb 22 y
Mar 10 y
May 13 y
May 14 c
May 15 c
July 31 y
November 3 y
ID# 111
Date Absent Flag
Mar 1 y
May 10 y
May 11 c
May 12 c
Sept 3 y
ID# 112
Date Absent Flag
Jan 3 y
Jan 4 c
Jan 5 c
Jan 6 c
April 28 y
April 29 c
April 30 c
ID# 113
Date Absent Flag
Feb 22 y
Mar 10 y
May 13 y
May 14 c
May 15 c
July 31 y
November 3 y