Thread: Check date
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Check date

A small, but important addition to my comments...

While this is not an answer to the question you asked, I thought you might
be interested in the complimentary functional code... given a date in G3,
what is the date of the first Monday on or after the 29th of G3's month?
The answer is...

=36+G3-DAY(G3)-WEEKDAY(G3-DAY(G3)-1)

You can't use this function directly


to solve your original problem

because it uses G3's month to calculate from. For example, if you set
June 4, 2007 into G3, it won't return June 4, 2007 even though that
date is a first Monday on or after a 29th of some month because it
doesn't know to look at the previous month. As I said, I just


thought

you might find the simplicity of the function interesting.


Rick