Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Date function: 1st, 3rd and 5th Mondays of a month

Hello:

I wanted the value of a cell to change (either "yes" or "No") based on
the following date conditions:

Return "Yes" if today's date was either the 1st or 3rd or 5th MONDAY of
the month (else value = false)

Is it possible to do so using a formula?
If not what would be the VBA code required for this?

Would appreciate help with this

TIA
Vinay

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Date function: 1st, 3rd and 5th Mondays of a month

See http://www.cpearson.com/excel/DateTimeWS.htm

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Date function: 1st, 3rd and 5th Mondays of a month

Look at Chip Pearson's site and you can combine some of the formulas there
to do what you want:

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

if you want to use VBA, you can find that as well:

http://www.cpearson.com/excel/DateTimeVBA.htm#NDow

--
Regards,
Tom Ogilvy


wrote in message
ups.com...
Hello:

I wanted the value of a cell to change (either "yes" or "No") based on
the following date conditions:

Return "Yes" if today's date was either the 1st or 3rd or 5th MONDAY of
the month (else value = false)

Is it possible to do so using a formula?
If not what would be the VBA code required for this?

Would appreciate help with this

TIA
Vinay



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Date function: 1st, 3rd and 5th Mondays of a month

Thanks Mika & Tom
Will give Pearson's site a try
Vinay

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Date function: 1st, 3rd and 5th Mondays of a month

Here is a formula in "one shot" that should do it:
=IF(AND(WEEKDAY(TODAY(),2)=1,OR(DAY(TODAY())<8,AND (DAY(TODAY())14,DAY(TODAY())<22),DAY(TODAY())28) ),"YES","NO")
--
- K Dales


"Tom Ogilvy" wrote:

Look at Chip Pearson's site and you can combine some of the formulas there
to do what you want:

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

if you want to use VBA, you can find that as well:

http://www.cpearson.com/excel/DateTimeVBA.htm#NDow

--
Regards,
Tom Ogilvy


wrote in message
ups.com...
Hello:

I wanted the value of a cell to change (either "yes" or "No") based on
the following date conditions:

Return "Yes" if today's date was either the 1st or 3rd or 5th MONDAY of
the month (else value = false)

Is it possible to do so using a formula?
If not what would be the VBA code required for this?

Would appreciate help with this

TIA
Vinay






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Date function: 1st, 3rd and 5th Mondays of a month

Thanks to K Dales, & Ron.
Both solutions worked
Vinay

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
Counting Mondays in Date Range nospaminlich Excel Worksheet Functions 5 February 28th 08 05:41 PM
How do I calculate number of Mondays in a given month in Excel? Rossta Excel Worksheet Functions 3 May 26th 06 04:07 PM
Count Mondays worked in Month harnagel Excel Worksheet Functions 2 December 8th 05 03:12 PM
Count Mondays worked in Month harnagel Excel Worksheet Functions 6 December 6th 05 09:02 AM
Is it possible to grab just the Mondays-Thursdays of every month? Arlen Excel Discussion (Misc queries) 5 January 4th 05 08:29 PM


All times are GMT +1. The time now is 12:09 AM.

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"