View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default formatting dates- getting an error

You're welcome....(but, Dave Peterson deserves the credit.)

***********
Regards,
Ron

XL2002, WinXP


"CC" wrote:

SUCCESS! Thanks Ron. -CC

"Ron Coderre" wrote:

Try this:

=IF($E$42="","",WORKDAY($E$42,I11))

Notice the comma in the WORKDAY section of the formula. The second argument
of the WORKDAY function is for the number of workdays to be added/subtracted.

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"CC" wrote:


Hi Dave.....I tried your formula (a form of it), but I am still getting an
error:

=IF($E$42="","",WORKDAY($E$42+I11))

E42 is the start date and I11, I12, etc. are the cells that I have set aside
to adjust the amount of days I am working back. So for example, if E42 is
Monday July 10, I want the date above to be Friday July 7 (so I set I11 to be
-1).

FYI, I checked the analysis toolpak and analysis toolpak vba in the add-ins.

Any help is appreciated. Thanks! -CC



"Dave Peterson" wrote:

If you have the analysis toolpak loaded (tools|Addins), you can use a range that
contains that list of holidays (give it a nice name):

=IF(A1="","",WORKDAY(A1,1,holidays))



GregR wrote:

Is there a way to incorporate holidays into this formula? TIA

Greg

Ron Coderre wrote:
Another way...a bit more compact:

For A1 = any StartDate (even a Sat or Sun)

A2: =A1+MATCH(MAX(WEEKDAY(A1+1,2),5),{5,7,6},0)
Copy A2 down as far as needed

***********
Regards,
Ron

XL2002, WinXP


"Ron Coderre" wrote:

If you want to list consecutive workdays, beginning with the value in A1, try
this:

A1: (StartDate)
A2: =IF(A1="","",A1+MATCH(TRUE,(WEEKDAY(A1+{1,2,3},2)< 6),0))
Copy A2 down as far as you need

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"CC" wrote:

For the following formula,

=IF(A1="","",A1+1)

note: where A1 is a start date

How do I format it for weekdays only?

I'm trying to create a schedule template that will work backwards.

Thanks in advance for your help.

--

Dave Peterson