Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating the first day of the week for the month

I want to show the date of each of the Mondays in the
month based upon the month typed in cell A4.

Example

A4 will show September(whether typed by a user or from a
combo box).

Cell B1 will show the first Monday
Cell B2 will show the second Monday
Cell B3 will show the third Monday
Cell B4 will show the fourth Monday
Cell B5 will show the fifth Monday (example: 2004 has 4
moths that have 5 Mondays)

Thanks fo any help you can provide.
Justin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Calculating the first day of the week for the month

Hi Justin,

Visit

http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

--
Regards,

Niek Otten
Microsoft MVP - Excel

"Justin" wrote in message
...
I want to show the date of each of the Mondays in the
month based upon the month typed in cell A4.

Example

A4 will show September(whether typed by a user or from a
combo box).

Cell B1 will show the first Monday
Cell B2 will show the second Monday
Cell B3 will show the third Monday
Cell B4 will show the fourth Monday
Cell B5 will show the fifth Monday (example: 2004 has 4
moths that have 5 Mondays)

Thanks fo any help you can provide.
Justin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Calculating the first day of the week for the month

Cell A4 MUST contain a valid date (first day of the month) for this to work (ie September 1, 2003). So enter a valid date and
custom format it as "mmmm" which will show only the month while containing a valid date.

Then in cell B1 put
=IF(TEXT(A4,"ddd") = "Mon", A4,IF(TEXT(A4+1,"ddd") = "Mon", A4+1,IF(TEXT(A4+2,"ddd") = "Mon", A4+2,IF(TEXT(A4+3,"ddd") = "Mon",
A4+3,IF(TEXT(A4+4,"ddd") = "Mon",A4+ 4,IF(TEXT(A4+5,"ddd") = "Mon", A4+5,IF(TEXT(A4+6,"ddd") = "Mon", A4+6 )))))))

In cell B2 put
=IF(TEXT(B1,"mmmm") = TEXT(B1+7,"mmmm"),B1+7, "")
and drag down four cells.

Note: if values appear like 37837 then change the formatting to dates.

Dan E

"Justin" wrote in message ...
I want to show the date of each of the Mondays in the
month based upon the month typed in cell A4.

Example

A4 will show September(whether typed by a user or from a
combo box).

Cell B1 will show the first Monday
Cell B2 will show the second Monday
Cell B3 will show the third Monday
Cell B4 will show the fourth Monday
Cell B5 will show the fifth Monday (example: 2004 has 4
moths that have 5 Mondays)

Thanks fo any help you can provide.
Justin



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
calculating number of days belonging to each month within a given week kate zareba Excel Worksheet Functions 2 November 18th 09 01:09 PM
Day, Week or Month [email protected] Excel Discussion (Misc queries) 1 March 12th 09 08:34 AM
Name The Week Of The Month Mathew Excel Discussion (Misc queries) 7 July 17th 08 01:34 PM
Week of the Month Janet BN Excel Discussion (Misc queries) 9 October 17th 07 12:01 AM
Calculating recurring date in following month, calculating # days in that period Walterius Excel Worksheet Functions 6 June 4th 05 11:21 PM


All times are GMT +1. The time now is 11:21 PM.

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

About Us

"It's about Microsoft Excel"