First and last days in months

G

GARY

What is the EARLIEST weekday (i.e., Monday, Thursday, etc) that June
30th can fall on?
What is the LATEST weekday that July 1st can fall on?
 
G

Gary''s Student

As you can see from the data below, June30th can fall on any weekday:

6/30/2006 Fri
6/30/2007 Sat
6/30/2008 Mon
6/30/2009 Tue
6/30/2010 Wed
6/30/2011 Thu
6/30/2012 Sat
6/30/2013 Sun
6/30/2014 Mon
6/30/2015 Tue
6/30/2016 Thu
6/30/2017 Fri
6/30/2018 Sat
6/30/2019 Sun
6/30/2020 Tue
6/30/2021 Wed
6/30/2022 Thu
6/30/2023 Fri
6/30/2024 Sun
6/30/2025 Mon
6/30/2026 Tue
 
B

Bob Phillips

Strange question, any date can fall on any day.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

GARY

Assuming a "normal" work-week of Monday thru Friday, I'm trying to
define a range of "valid" dates starting on the last 'working-day" in
June and the ending on the first "working-day" in July {not including
Saturday, Sundays or U.S. holidays (whether actual and observed)].
 
B

Bob Phillips

The last working day of June is

=WORKDAY(WORKDAY(DATE(2006,7,0),1),-1)

The first in July is

=WORKDAY(DATE(2006,7,0),1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

GARY

For:
=WORKDAY(WORKDAY(DATE(2006,7,0),1),-1)
the cell contains #NAME?

For:
=WORKDAY(DATE(2006,7,0),1)
the cell contains #NAME?

What should be displayed?
 
B

Bob Phillips

You need to make sure that the Analysis Toolpak is installed (Tools>Addins,
and check the item).

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Top