IF statement with Weekends vs. weekdays

E

edwardpestian

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
 
C

CaptainQuattro

edwardpestian said:
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))
 
C

CaptainQuattro

OK. I learned something.

The optional parameter ,2 changes the day numbers to 1 for Monday
through 7 for Sunday.

You can also use parameter ,3 which makes Monday 0, and Sunday 6
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top