ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Weekday function? (https://www.excelbanter.com/excel-discussion-misc-queries/177950-weekday-function.html)

Cam

Weekday function?
 
Hello,

I have many rows with a date column. I am trying to calculate a new column
(Week_Ending) so it will return a date field (every Sunday) that the date
fall in that week using a weekday function, but could not get it to work.

Example:
Date Week_Ending
2/1/08 2/3/08
2/2/08 2/3/08
2/3/08 2/3/08
2/4/08 2/10/08
2/5/08 2/10/08
2/6/08 2/10/08
2/20/08 2/24/08

Thanks



Mike H

Weekday function?
 
With your date in a1 put this in b1 and drag down

=A1+(6-WEEKDAY(A1,2)+1)

Mike

"Cam" wrote:

Hello,

I have many rows with a date column. I am trying to calculate a new column
(Week_Ending) so it will return a date field (every Sunday) that the date
fall in that week using a weekday function, but could not get it to work.

Example:
Date Week_Ending
2/1/08 2/3/08
2/2/08 2/3/08
2/3/08 2/3/08
2/4/08 2/10/08
2/5/08 2/10/08
2/6/08 2/10/08
2/20/08 2/24/08

Thanks




All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com