PDA

View Full Version : Solved: Calculating Week Ending date based on Sunday week end?



marshybid
04-17-2008, 02:55 AM
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

Bob Phillips
04-17-2008, 07:32 AM
Keeping it simple, add this to B2 and copy down

=A2+CHOOSE(WEEKDAY(A2),0,6,5,4,3,2,1)

marshybid
04-17-2008, 08:00 AM
Hi xld, Thanks for that. I can easily add that into the rest of the macro.

Marshybid:joy: