View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CaptainQuattro
 
Posts: n/a
Default IF statement with Weekends vs. weekdays


edwardpestian Wrote:
I'm looking for an IF statement that basically says the following:

IF R6 = a weekend (Friday,Saturday,Sunday) then K36 = Data!CY8*(1.23)
IF R6 = a weekday (Monday - Thursday) then K36 = Data!CY*(1.13)

I'm not sure how to have it determing the weekends vs weekdays.

Thanks in advance.

EP


Edward:

The =WEEKDAY function returns 1 for Sunday through 7 for Saturday.

Therefore formula in K36 should be

=IF(OR(WEEKDAY(R6)5,WEEKDAY(R6)=1),Data!CY8*(1.23 ),Data!CY8*(1.13))


--
CaptainQuattro
------------------------------------------------------------------------
CaptainQuattro's Profile: http://www.excelforum.com/member.php...o&userid=32763
View this thread: http://www.excelforum.com/showthread...hreadid=539612