Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable Date Selection

Status
Not open for further replies.

Verner

Mining
Joined
Jul 7, 2003
Messages
24
Location
US
I am trying to setup a timesheet but don't want to rename the appropriate days of the week every week I start a new one. I simply want a template that adjusts the days of the week for the current week I am in.

What I want to do is have some sort of function that generates dates for the current week (some sort of a "Today() + X" where X is a variable function that fixes the dates for that given week).

Anybody know how?

Thanks
 
The day of the week for a given date never changes. Once you figure which date goes on the first day of the week, everything thing else is already known.

TTFN



 
I'm not clear on what you are trying to do, but:

=day(today()) will return a value from 0 to 6 corresponding to Sunday to Saturday, which would seem a good start.
 
Oops, sorry, it's

=WEEKDAY(TODAY()) returns 1 to 7

This litte formula:

=INT((NOW()-1)/7)*7+1

returns the previous Sunday. (Thanks to tek-tips)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top