WEEKDAY IF FORMULA

  • Thread starter Thread starter standardprince
  • Start date Start date
S

standardprince

I want to create an formula - where i type in a future date say July
5th 2005.
THEN to the right it will show me 21 days before 14 days before a week
before and 4 days before BUT what i want to do is if that date is on a
WEEKEND, then to go to the next earlist weekday. so say 4 days before
is a Sunday or Sat- than i want it to show me the Friday. HELPPPPPPPP!
 
I want to create an formula - where i type in a future date say July
5th 2005.
THEN to the right it will show me 21 days before 14 days before a week
before and 4 days before BUT what i want to do is if that date is on a
WEEKEND, then to go to the next earlist weekday. so say 4 days before
is a Sunday or Sat- than i want it to show me the Friday. HELPPPPPPPP!


A2: Date you type in
B1: Number of days to subtract

=workday($A$2-B1+1,-1)

==================================
If the WORKDAY is not available, and returns the #NAME? error, install and load
the Analysis ToolPak add-in.

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.



--ron
 
Hi

For four days before and the date is typed into cell A1

=IF(OR(WEEKDAY(A1-4)=1,WEEKDAY(A1-4)=7),IF(WEEKDAY(A1-4)=1,A1-6,A1-5),A1-4)


Doug


(e-mail address removed) wrote in message
 
Back
Top