Consulting

Results 1 to 3 of 3

Thread: Solved: Calculating Week Ending date based on Sunday week end?

  1. #1
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    228
    Location

    Question Solved: Calculating Week Ending date based on Sunday week end?

    Hi There,

    I have a large amount of data that shows me the exact date that certain activities were performed.

    I need to then show these activities consolidated in a pivot table by activity performed in Week Ending (using Sunday as the week ending date)

    I have attached aspreadsheet with the 2 columns - date worked (column A) and week ending (column B)

    Can anybody please help with a script that will review each row and then insert the week ending in the format dd-mmm-yyyy.

    Thanks, Marshybid

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Keeping it simple, add this to B2 and copy down

    =A2+CHOOSE(WEEKDAY(A2),0,6,5,4,3,2,1)
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    228
    Location
    Hi xld, Thanks for that. I can easily add that into the rest of the macro.

    Marshybid

Posting Permissions

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