+ Reply to Thread
Results 1 to 7 of 7

First and Last Weekday Dates for Each Week of Month

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408

    Question Dates of First and Last Workdays of Each Week of Month

    Hi,

    I need a formula in cells B1 to B5 to give the dates of the first workday, and a formula in cells D1 to D5 to give the dates of the last workday of each week of the month that is entered in A1 -- appearing in the format:

    (A1)April (B1)__________ (C1)to (D1)__________

    Thanks,
    Gos-C
    Last edited by Gos-C; 04-11-2005 at 08:37 PM.

  2. #2
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408

    Dates of First and Last Workdays of Each Week of Month

    I have revised my post of yesterday. Any help?

    Gos-C

  3. #3
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    how's this?

    a1 month of interest entered as text
    b1 =IF(WEEKDAY(DATEVALUE(A1&" 1"),2)=6,DATEVALUE(A1&" 1")+2,IF(WEEKDAY (DATEVALUE(A1&" 1"),2)=7,DATEVALUE(A1&" 1")+1,DATEVALUE(A1&" 1")))

    this assumes current year

    d1 =6-WEEKDAY(B1,2)+B1

    b2 =B1+8-WEEKDAY(B1,2)

    b3 =B2+7 copy thru b5

    d2 =D1+7 copy thru d5
    not a professional, just trying to assist.....

  4. #4
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408
    Hi Duane,

    Thanks for your kind response.

    I am getting year 2001 instead of the current year. Can the formula reference the year -- entered in another cell? Also, the first workday is correct but the last workday is coming up as Saturday.

    Thanks again,
    Gos-C

  5. #5
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    for the Saturday issue, perhaps this

    d1 =6-WEEKDAY(B1,2)+B1

    should be

    d1 =5-WEEKDAY(B1,2)+B1

    for the year issue

    change

    DATEVALUE(A1&" 1"),

    to

    DATEVALUE(A1&" 1, "&a2),

    assuming cell a2 has the year in question in it (as a number)

    or you could format cell a1 as date, mmmm

    and input the date as 4/1/2001 for example

    and then change to

    DATEVALUE(A1)

  6. #6
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408
    Hi Duane,

    I got this to work. Thanks for your help.

    However, I am having difficulty getting this formula to work:

    =IF(AN2+7<DATE(YEAR(DATE!E23),MONTH(B2)+1,0),AN2+7,IF(AND(AN2+7>=DATE(YEAR(DATE!E23),MONTH(B2)+1,0),OR(WEEKDAY(DATE(YEAR(DATE!E23),MONTH(B2)+1,0)<>6,WEEKDAY(DATE(YEAR(DATE!E23),MONTH(B2)+1,0)<>7)),DATE(YEAR(DATE!E23),MONTH(B2)+1,0),"")))

    AN2 contains the first workday of the penultimate week.

    DATE(YEAR(DATE!E23),MONTH(B2)+1,0) is EOMonth

    Can anyone spot what I am doing wrong?

    Thanks,
    Gos-C
    Last edited by Gos-C; 04-13-2005 at 11:02 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1