Thread: If statement
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default If statement

Yup, see my two (or is it three) previous posts...

Thanks for the correction.

In article ,
"T. Valko" wrote:

WORKDAY() is in the Analysis Toolpak Add-in (Tools/Add-ins...)


Yeah, WORKDAY is, but not WEEKDAY.

Think you need to subtract 1 in WEEKDAY:

=C9-1-2*(WEEKDAY(C9-1)=1)

Biff

"JE McGimpsey" wrote in message
...
One way:

C12: =C9-1-2*(WEEKDAY(C9)=1)

WORKDAY() is in the Analysis Toolpak Add-in (Tools/Add-ins...)


In article ,
David T wrote:

I need help with a formula/macro. I have a formula that selects cell c9
and
subtracts it by 1 day. If that day is a Sunday, I want the formula to
subtract by 3 days. However, my current formula doesn't subtract by 3.
Please help

C9 : May 21, 2007

C12 =IF(C9-1= "Sunday",C9-3,C9-1)