Conditional formatting based on date

后端 未结 2 449
醉话见心
醉话见心 2021-01-28 19:39

Trying to set up a time card at work in Excel, have dates going down the left-hand side of the worksheet:

Fri 1/1/11

Sat 1/2/11

Sun 1/3/

2条回答
  •  时光说笑
    2021-01-28 20:13

    Assuming dates are in Column A:

    =IF(OR(WEEKDAY($A1)=1,WEEKDAY($A1)=7),1,0)
    

    Reads If the weekday is either Sunday or Saturday then True (Use Conditional Formatting)

    Or you can modify the same formula so that the 'weekdays' starts on Monday so it looks like this:

    =IF(WEEKDAY($A1,2)>5,1,0)
    

提交回复
热议问题