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

Don't know my own formula, Q5 isn't a date (oops), I changed the formula a
bit to correct that, but I get an error that says "Inconsistent Formula." It
seems to be working though.

What I have now is

=IF(OR($A5="",Q5=""),"",N5+LOOKUP(WEEKDAY(N5),{1,2 ,3,4,5,6,7},{1,1,1,1,1,3,2}))

$A5 is a date used for calculation, Q5 is from a dropdown list, N5 is a date
based off of $A5, jsut to clarify




"Biff" wrote:

Try this:

=IF(OR($A5="",Q5=""),"",N5+LOOKUP(WEEKDAY(Q5),{1,2 ,3,4,5,6,7},{1,1,1,1,1,3,2}))

Biff

"slinger" wrote in message
...
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.