#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
achapman
 
Posts: n/a
Default Date Population

I looked through all the message threads before asking this question.
Hopefully, I didn't miss the answer if it has already been stated.

I have a timesheet. A1 is the "Pay Period Ending x/xx/xxx". I want it so
that when someone enters a date in A1, the date appears in the cells above
the cells labeled Sunday - Saturday. I have 3 weeks in the timesheet because
pay periods are by the date and not the day of the week. We want to make it
easy for the employees by having the date automatically populate by the pay
period date.

It should look like the following:

Pay Period Ending 5/20/06

5/7 5/8 5/9 5/10 5/11
Sun Mon Tue Wed Thur etc.

In other words, whatever the date, the calculation will start with the
Sunday at least 2 weeks prior...

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pdberger
 
Posts: n/a
Default Date Population

achapman -- this is kind of brute force and maybe someone will have something
more elegant. But here's one way, involving lookup tables.

First, on some place that won't show up on the timecard, create a little
table as follows. I'm putting it out at $Y$1:$Z$7, just as an example
Y Z
1 1 Monday
2 2 Tuesday
3 3 Wednesday
etc.

Then
A B
1 Pay Period Ending 5/20/06
2
3 =b1-15 =b1-14
4 =VLOOKUP(WEEKDAY(A3),$Y$1:$Z$7,2)

tried it. think it works.

HTH


"achapman" wrote:

I looked through all the message threads before asking this question.
Hopefully, I didn't miss the answer if it has already been stated.

I have a timesheet. A1 is the "Pay Period Ending x/xx/xxx". I want it so
that when someone enters a date in A1, the date appears in the cells above
the cells labeled Sunday - Saturday. I have 3 weeks in the timesheet because
pay periods are by the date and not the day of the week. We want to make it
easy for the employees by having the date automatically populate by the pay
period date.

It should look like the following:

Pay Period Ending 5/20/06

5/7 5/8 5/9 5/10 5/11
Sun Mon Tue Wed Thur etc.

In other words, whatever the date, the calculation will start with the
Sunday at least 2 weeks prior...

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
jcamacho
 
Posts: n/a
Default Date Population

Cell A1 has your Pay Ending Date

In cell A3 create the formula: =A1-14
In cell B3 create the formula: =A1-13
In cell B4 create the formula: =A1-12
and so on

In cell A4 create the formula: =TEXT(A3,"ddd")
In cell B4 create the formula: =TEXT(B3,"ddd")
In cell C4 create the formula: =TEXT(C3,"ddd")
and so on







"achapman" wrote:

I looked through all the message threads before asking this question.
Hopefully, I didn't miss the answer if it has already been stated.

I have a timesheet. A1 is the "Pay Period Ending x/xx/xxx". I want it so
that when someone enters a date in A1, the date appears in the cells above
the cells labeled Sunday - Saturday. I have 3 weeks in the timesheet because
pay periods are by the date and not the day of the week. We want to make it
easy for the employees by having the date automatically populate by the pay
period date.

It should look like the following:

Pay Period Ending 5/20/06

5/7 5/8 5/9 5/10 5/11
Sun Mon Tue Wed Thur etc.

In other words, whatever the date, the calculation will start with the
Sunday at least 2 weeks prior...

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pdberger
 
Posts: n/a
Default Date Population

OK -- thought of a more elegant way on the drive home. Instead of the
VLOOKUP formula in B4, use:

=CHOOSE(WEEKDAY(B3),"Sunday","Monday","Tuesday", etc.)

Tried it. Works good.

HTH

"pdberger" wrote:

achapman -- this is kind of brute force and maybe someone will have something
more elegant. But here's one way, involving lookup tables.

First, on some place that won't show up on the timecard, create a little
table as follows. I'm putting it out at $Y$1:$Z$7, just as an example
Y Z
1 1 Monday
2 2 Tuesday
3 3 Wednesday
etc.

Then
A B
1 Pay Period Ending 5/20/06
2
3 =b1-15 =b1-14
4 =VLOOKUP(WEEKDAY(A3),$Y$1:$Z$7,2)

tried it. think it works.

HTH


"achapman" wrote:

I looked through all the message threads before asking this question.
Hopefully, I didn't miss the answer if it has already been stated.

I have a timesheet. A1 is the "Pay Period Ending x/xx/xxx". I want it so
that when someone enters a date in A1, the date appears in the cells above
the cells labeled Sunday - Saturday. I have 3 weeks in the timesheet because
pay periods are by the date and not the day of the week. We want to make it
easy for the employees by having the date automatically populate by the pay
period date.

It should look like the following:

Pay Period Ending 5/20/06

5/7 5/8 5/9 5/10 5/11
Sun Mon Tue Wed Thur etc.

In other words, whatever the date, the calculation will start with the
Sunday at least 2 weeks prior...

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
achapman
 
Posts: n/a
Default Date Population

I think this does it. I don't see a way to keep the Sunday - Saturday
rotation look consistent through the spreadsheet. She wanted just the date
to be changed, but this should work. Thanks so much!

"jcamacho" wrote:

Cell A1 has your Pay Ending Date

In cell A3 create the formula: =A1-14
In cell B3 create the formula: =A1-13
In cell B4 create the formula: =A1-12
and so on

In cell A4 create the formula: =TEXT(A3,"ddd")
In cell B4 create the formula: =TEXT(B3,"ddd")
In cell C4 create the formula: =TEXT(C3,"ddd")
and so on







"achapman" wrote:

I looked through all the message threads before asking this question.
Hopefully, I didn't miss the answer if it has already been stated.

I have a timesheet. A1 is the "Pay Period Ending x/xx/xxx". I want it so
that when someone enters a date in A1, the date appears in the cells above
the cells labeled Sunday - Saturday. I have 3 weeks in the timesheet because
pay periods are by the date and not the day of the week. We want to make it
easy for the employees by having the date automatically populate by the pay
period date.

It should look like the following:

Pay Period Ending 5/20/06

5/7 5/8 5/9 5/10 5/11
Sun Mon Tue Wed Thur etc.

In other words, whatever the date, the calculation will start with the
Sunday at least 2 weeks prior...



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
achapman
 
Posts: n/a
Default Date Population

Well, she does want to keep the Sunday through Saturday lineup. In other
words, the dates will always start with the Sunday about 2 weeks prior to the
pay period, just like below:

5/7 5/8 5/9 5/14 5/15 5/16
Sun Mon Tues.... Sun Mon Tues...

So that only the date changes, not the days of the week. Is this even
possible?

"achapman" wrote:

I think this does it. I don't see a way to keep the Sunday - Saturday
rotation look consistent through the spreadsheet. She wanted just the date
to be changed, but this should work. Thanks so much!

"jcamacho" wrote:

Cell A1 has your Pay Ending Date

In cell A3 create the formula: =A1-14
In cell B3 create the formula: =A1-13
In cell B4 create the formula: =A1-12
and so on

In cell A4 create the formula: =TEXT(A3,"ddd")
In cell B4 create the formula: =TEXT(B3,"ddd")
In cell C4 create the formula: =TEXT(C3,"ddd")
and so on







"achapman" wrote:

I looked through all the message threads before asking this question.
Hopefully, I didn't miss the answer if it has already been stated.

I have a timesheet. A1 is the "Pay Period Ending x/xx/xxx". I want it so
that when someone enters a date in A1, the date appears in the cells above
the cells labeled Sunday - Saturday. I have 3 weeks in the timesheet because
pay periods are by the date and not the day of the week. We want to make it
easy for the employees by having the date automatically populate by the pay
period date.

It should look like the following:

Pay Period Ending 5/20/06

5/7 5/8 5/9 5/10 5/11
Sun Mon Tue Wed Thur etc.

In other words, whatever the date, the calculation will start with the
Sunday at least 2 weeks prior...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Adding XY days to date in cells satucha Excel Discussion (Misc queries) 1 November 25th 05 08:02 AM
Another Date issue. TimM Excel Worksheet Functions 1 November 17th 05 01:58 AM
Date Math Problem Dkline Excel Worksheet Functions 4 March 4th 05 04:11 PM
Need help troubleshooting an array formula XLXP on Win2K KR Excel Worksheet Functions 1 December 13th 04 07:41 PM


All times are GMT +1. The time now is 03:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"