WEEKDAY IF FORMULA

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!
 
R

Ron Rosenfeld

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
 
D

Doug

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top