View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
miner miner is offline
external usenet poster
 
Posts: 1
Default account for weekends in date formula

Hi...slinger...your formula looks good for me...
Inconsistent formula doesnt mean your formula is wrong !!! Its just a type
of notice regarding comparison of other formulas adjacent to it..!!!
Anyway...based on the lookup
when N5 is on Friday,Sat or Sun then your result is Monday...
when N5 is on Monday then your result is Tuesday....
then when N5 is Thursday then your result will be FRIDAY...
is this an appointment scheduling...getting rid of friday/sat/sun?

"slinger" wrote:

Unfortunately I am unable to use the "workday" function as I cannot determine
who else in the company has the add-in enabled. and the other, (Once I
corrected my error) still gives me an "inconsistent formula" error

"Ron Coderre" wrote:

Have you considered the WORKDAY function?
It returns the date that is n-workdays from a base date.

(Note: the WORKDAY function is part of the Analysis ToolPak add-in)

=IF(OR(ISBLANK($A5),ISBLANK(Q5)),"",WORKDAY(N5,1))

Alternatively, maybe this
=IF(OR(ISBLANK($A5),ISBLANK(Q5)),"",N5+CHOOSE(WEEK DAY(Q5,2),1,1,1,1,3,2,1))


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

XL2002, WinXP


"slinger" wrote:

I have the following formula set in one of my columns

=IF(OR(ISBLANK($A5),ISBLANK(Q5)),"",N5+1)

I need this to account for weekend days however and if Q5 falls on a Friday
to add 3 (so that the formula returns a date for monday, and if Q5 falls on a
Saturday to add 2 (again so that the formula returns a date for Monday.) The
remainder of the formula needs to stay intact however, as there are other
functions that depend on it.

Any help would be greatly appreciated.

Thanks.