Using your posted workbook...try this:
C3: =SUMPRODUCT(--(DAY(ROW(INDEX(A:A,$B3):INDEX(A:A,$B$1)))={16,31}))
Copy that formula down through C7
With your posted data the formulas return these values:
C3: 3
C4: 27
C5: 26
C6: 26
C7: 10
One issue to be resolved...If a person's hire date is ON a payday, I assume they won't receive a paycheck on that date. If that's true, use this formula:
C3: =SUMPRODUCT(--(DAY(ROW(INDEX(A:A,$B3+1):INDEX(A:A,$B$1)))={16,31}))
The new values returned will be these:
C3: 3
C4: 27
C5: 26
C6: 25
C7: 10
Is that something you can work with?
Bookmarks