#1   Report Post  
Matt_hull1979
 
Posts: n/a
Default 4 or 5 week months?

I am designing a new overtime form and our overtime policy states that each
form must be from the First Monday of the month until the week commencing on
the last Monday of the month.

I would like to have it so that if you enter the start date of the overtime
form (in field B2) at the top of the page the 5 columns all headed with dates
are automatically populated.

This is easy enough with the first column (C8) =B2, and all later dates
=C8+7, =D8+7, etc.

The problem is...

If I enter the start period as yesterday 4/9/2005 (sorry, I'm English, so
may have the date the wrong way round for the Americans!) then the final
Monday of the 5 week period will be 2/10/2005, in the following month. In
this case, instead of automatically updating to 2/10/2005, I would like the
field to remain blank and only 4 of the columns to be headed.

Is this possible?

Many thanks in advance!
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 6 Sep 2005 09:22:12 -0700, "Matt_hull1979"
wrote:

I am designing a new overtime form and our overtime policy states that each
form must be from the First Monday of the month until the week commencing on
the last Monday of the month.

I would like to have it so that if you enter the start date of the overtime
form (in field B2) at the top of the page the 5 columns all headed with dates
are automatically populated.

This is easy enough with the first column (C8) =B2, and all later dates
=C8+7, =D8+7, etc.

The problem is...

If I enter the start period as yesterday 4/9/2005 (sorry, I'm English, so
may have the date the wrong way round for the Americans!) then the final
Monday of the 5 week period will be 2/10/2005, in the following month. In
this case, instead of automatically updating to 2/10/2005, I would like the
field to remain blank and only 4 of the columns to be headed.

Is this possible?

Many thanks in advance!


Perhaps this will help:

With any date in B2, the first Monday of that month is given by the formula:

=B2-DAY(B2)+8-WEEKDAY(B2-DAY(B2)+6)

(This may not be necessary, but might be easier than ensuring the date you
enter in B2 is always the first Monday).

To ensure, as you copy down the column, that the field remains blank, there are
several options.

1. Change your formula to read:

D8: =IF(MONTH(C8+7)=MONTH($C$8),C8+7,"")

or, you could use conditional formatting.

Highlight the entire range with C8 the active cell.

Format/Conditional Formatting/Formula Is:
=MONTH(C8)<MONTH($C$8)

Then Format the font color to white (or whatever the background color is).


--ron
  #4   Report Post  
Bernd Plumhoff
 
Posts: n/a
Default

Hi Matt,

Write into cell C8:
=IF(MONTH($B$2)=MONTH($B$2+(COLUMN()-3)*7),$B$2+(COLUMN()-3)*7,"")

and copy this to D8:F8.

HTH,
Bernd
  #5   Report Post  
sdosborne
 
Posts: n/a
Default

It should be possible. In D8, type the following formula:
=if(month($b2)<month((c8+7)),"",c8+7)
Compare the month of the start date to the month of the previous column
heading plus 7 days. If they are not equal, then do nothing ("").
Otherwise, take the previous column heading and add 7 days to it.

I wrote the formula so you could copy it to the remaining 3 column headings.

Best wishes.

Scott

"Matt_hull1979" wrote:

I am designing a new overtime form and our overtime policy states that each
form must be from the First Monday of the month until the week commencing on
the last Monday of the month.

I would like to have it so that if you enter the start date of the overtime
form (in field B2) at the top of the page the 5 columns all headed with dates
are automatically populated.

This is easy enough with the first column (C8) =B2, and all later dates
=C8+7, =D8+7, etc.

The problem is...

If I enter the start period as yesterday 4/9/2005 (sorry, I'm English, so
may have the date the wrong way round for the Americans!) then the final
Monday of the 5 week period will be 2/10/2005, in the following month. In
this case, instead of automatically updating to 2/10/2005, I would like the
field to remain blank and only 4 of the columns to be headed.

Is this possible?

Many thanks in advance!



  #6   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,

For the column header for the 5th column (G8, I guess), use the formula,
=IF(MONTH(F8+7)MONTH(F8),"",F8+7)

Regards,
B.R. Ramachandran

"Matt_hull1979" wrote:

I am designing a new overtime form and our overtime policy states that each
form must be from the First Monday of the month until the week commencing on
the last Monday of the month.

I would like to have it so that if you enter the start date of the overtime
form (in field B2) at the top of the page the 5 columns all headed with dates
are automatically populated.

This is easy enough with the first column (C8) =B2, and all later dates
=C8+7, =D8+7, etc.

The problem is...

If I enter the start period as yesterday 4/9/2005 (sorry, I'm English, so
may have the date the wrong way round for the Americans!) then the final
Monday of the 5 week period will be 2/10/2005, in the following month. In
this case, instead of automatically updating to 2/10/2005, I would like the
field to remain blank and only 4 of the columns to be headed.

Is this possible?

Many thanks in advance!

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
Formula for If Term is on Certain Date then Count Krisjhn Excel Worksheet Functions 3 August 30th 05 07:57 PM
Why "datedif" function results sometimes negative numbers? Ambrosiy Excel Worksheet Functions 1 July 8th 05 11:29 AM
user defined function Brian Rogge Excel Worksheet Functions 5 May 23rd 05 06:21 PM
Line or bar graphs for tracking stocks profit and loss. Mocity Charts and Charting in Excel 1 January 21st 05 01:21 AM
Weekly data allocated to months Henry Bolton Excel Worksheet Functions 2 December 13th 04 02:15 PM


All times are GMT +1. The time now is 04:36 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"