Counting number of pay period dates between 2 numbers
In case the OP wants to consider a non-volatile, non-array-based formula...
=2*(DATEDIF(A1-DAY(A1)+1,B1-DAY(B1)+1,"m")-1)+(DAY(A1)=1)+(DAY(A1)<=15)+(DAY(B1)=1)+(DAY(B1) =15)
Rick
"T. Valko" wrote in message
...
That can be reduced to:
=SUMPRODUCT(--(DAY(ROW(INDIRECT(A1&":"&B1)))={1,15}))
--
Biff
Microsoft Excel MVP
"Infinitogool" wrote in message
...
Hi janplan
1 day A1
2 day B1
Try
=SUMPRODUCT((DAY(ROW(INDIRECT($A$1&":"&$B$1)))=1)+ (DAY(ROW(INDIRECT($A$1&":"&$B$1)))=15))
Regards,
Pedro J.
If I have two dates (i.e. hire and terminated dates), how do I calculate
the number of pay periods if the person was paid the 1st and 15th of
every month?
|