Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 -- edwardpestian ------------------------------------------------------------------------ edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809 View this thread: http://www.excelforum.com/showthread...hreadid=539612 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=If(weekday(R6,2)<5,Data!CY8*1.13,Data!CY8*1.23)
"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 -- edwardpestian ------------------------------------------------------------------------ edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809 View this thread: http://www.excelforum.com/showthread...hreadid=539612 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 -- CaptainQuattro ------------------------------------------------------------------------ CaptainQuattro's Profile: http://www.excelforum.com/member.php...o&userid=32763 View this thread: http://www.excelforum.com/showthread...hreadid=539612 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Thanks all for the help, it's working perfect. Regards, EP -- edwardpestian ------------------------------------------------------------------------ edwardpestian's Profile: http://www.excelforum.com/member.php...o&userid=33809 View this thread: http://www.excelforum.com/showthread...hreadid=539612 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
WEEKENDS VS. WEEKDAYS | Excel Discussion (Misc queries) | |||
SET statement tutorial | Excel Discussion (Misc queries) | |||
If statement | Excel Discussion (Misc queries) | |||
Do I need a sumif or sum of a vlookup formula? | Excel Worksheet Functions | |||
Recognizing weekends and changing to weekdays in Excel | Excel Discussion (Misc queries) |