Thread: Pay day
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
nbslarson nbslarson is offline
external usenet poster
 
Posts: 16
Default Pay day

I tried that, but the formula returned the 01/01/00.
I had the year (2009) in a cell and the month (9) in another cell.

This is the page I'm working with:

4th Quarter 2009
09/16/09 09/30/09 10/06/09 01/01/00 (what the formula returned) Date should
be 10/06/09.
10/01/09 10/15/09 10/21/09
10/16/09 10/31/09 12/06/09
11/01/09 11/15/09 11/21/09
11/16/09 11/30/09 12/04/09 12/06 = Sunday
12/01/09 12/15/09 12/21/09


"Stefi" wrote:

Try this:
If year is in A2, month in B2, then
for 6th:
=IF(WEEKDAY(DATE(A2,B2,6),2)<6,DATE(A2,B2,6),8-WEEKDAY(DATE(A2,B2,6),2))

for 21st:
=IF(WEEKDAY(DATE(A2,B2,21),2)<6,DATE(A2,B2,6),8-WEEKDAY(DATE(A2,B2,21),2))


Regards,
Stefi


€žnbslarson€ť ezt Ă*rta:

Our working period is divided into 2 sections a month: 1st thru 15th and
16th thru last. We are paid on the 6th of the month and the 21st of the
month OR the closest workday to the end of the pay period.

Can you help me construct a formula to return this value?

Thank you for any help you can offer.