Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Date Question

Is there a forumla to enter into a cell which can report for e.g.

a) the date of the first monday of the month?
b) the first working day of the week?

Much appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Date Question

hi
see this site....
http://www.cpearson.com/Excel/datetime.htm#DaysInMonth

regards
FSt1

"AMaleThing" wrote:

Is there a forumla to enter into a cell which can report for e.g.

a) the date of the first monday of the month?
b) the first working day of the week?

Much appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Date Question

Read through all the formulas on this page: (don't just look at the top of
the page)

http://www.cpearson.com/Excel/DateTimeWS.htm

--
Regards,
Tom Ogilvy



"AMaleThing" wrote:

Is there a forumla to enter into a cell which can report for e.g.

a) the date of the first monday of the month?
b) the first working day of the week?

Much appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Date Question

if A1 contains th efirst date of the month (ie 7/1/08)

=A1+MOD(8-WEEKDAY(A1,2),7)

if you need to create the 1st day of the month then add DATE

=DATE(2008,7,1)+MOD(8-WEEKDAY(DATE(2008,7,1),2),7)

"AMaleThing" wrote:

Is there a forumla to enter into a cell which can report for e.g.

a) the date of the first monday of the month?
b) the first working day of the week?

Much appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date Question

If A1 contains any date within the month, then the first Monday of that
month can be found with this formula....

=A1-DAY(A1)+1+CHOOSE(WEEKDAY(A1-DAY(A1)+1),1,0,6,5,4,3,2)

Rick


"AMaleThing" wrote in message
...
Is there a forumla to enter into a cell which can report for e.g.

a) the date of the first monday of the month?
b) the first working day of the week?

Much appreciated.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Date Question

On 4 Jul, 16:19, "Rick Rothstein \(MVP - VB\)"
wrote:
If A1 contains any date within the month, then the first Monday of that
month can be found with this formula....

=A1-DAY(A1)+1+CHOOSE(WEEKDAY(A1-DAY(A1)+1),1,0,6,5,4,3,2)

Rick

"AMaleThing" wrote in message

...



Is there a forumla to enter into a cell which can report for e.g.


a) the date of the first monday of the month?
b) the first working day of the week?


Much appreciated.- Hide quoted text -


- Show quoted text -


Thank you for your solutions. I'd have never have used that script
even after spending the best part of an hour looking in the index
help.

Thanks to everyone. (links appreciated).
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Date Question

On Fri, 4 Jul 2008 06:53:39 -0700 (PDT), AMaleThing wrote:

Is there a forumla to enter into a cell which can report for e.g.

a) the date of the first monday of the month?
b) the first working day of the week?

Much appreciated.


With some date in A1:

First Monday:

=A1-DAY(A1)+8-WEEKDAY(A1-DAY(A1)-1)

And, requiring either Excel 2007 or installation of the Analysis ToolPak for
earlier versions of Excel:

first working day of the week:

=WORKDAY(A1-WEEKDAY(A1),1,Holidays)

where Holidays is a range where your holiday dates are stored.

First working day of the month:

=WORKDAY(A1-DAY(A1),1)
--ron
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Date Question

On 4 Jul, 16:19, "Rick Rothstein \(MVP - VB\)"
wrote:
If A1 contains any date within the month, then the first Monday of that
month can be found with this formula....

=A1-DAY(A1)+1+CHOOSE(WEEKDAY(A1-DAY(A1)+1),1,0,6,5,4,3,2)

Rick

"AMaleThing" wrote in message

...



Is there a forumla to enter into a cell which can report for e.g.


a) the date of the first monday of the month?
b) the first working day of the week?


Much appreciated.- Hide quoted text -


- Show quoted text -


Starting with the simpiest looking formulas, I'm trying:
=A1+MOD(8-WEEKDAY(A1,2),7)

Can you help me to understand why 8 is subtracted from WEEKDAY?
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
DATE question WLMPilot Excel Worksheet Functions 2 January 20th 09 09:42 PM
Date Question Andrew Mackenzie Excel Discussion (Misc queries) 7 September 21st 07 04:30 PM
Date question Jman Excel Worksheet Functions 8 June 1st 07 10:43 AM
This is a date question... Robert Excel Discussion (Misc queries) 4 August 2nd 05 04:22 PM
date question david Excel Programming 1 July 23rd 03 09:50 PM


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