View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Formula for the first working day of the year

On Thu, 22 Nov 2007 07:43:07 -0500, Ron Rosenfeld
wrote:

On Wed, 21 Nov 2007 00:59:00 -0800, Ron@Buy
wrote:

Senario: The first working day of any year is the first Monday in the year,
except where the 1st January is a Monday then the 8th January is the first
working day.
Action: When any date is entered into A1 a formula in cell A2 returns the
date of the first working day of that year.
Problem: I'm having difficulty developing a formula that produces a correct
result whatever date is entered into A1.
Plea: I'm sure there must be a simple solution, but I've can't see the wood
for the trees. Can anybody help please?



I understand you to mean NOT the first working day of the year but rather the
first working MONDAY of the year. Therefo

IF the date in A1 will always be a date in the month of January, then:

=A1-DAY(A1)-WEEKDAY(A1-DAY(A1)+5)+7+7*(WEEKDAY(A1-DAY(A1))=1)

If it might be any date in the year, then:

=DATE(YEAR(A1),1,0)-WEEKDAY(DATE(YEAR(A1),1,0)+5)+7+7*(WEEKDAY(DATE(YE AR(A1),1,0))=1)


--ron



Never mind. Stephen's is shorter.
--ron