Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2007
    Location
    Gray, Louisiana, USA
    Posts
    289
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Format Day Formula (2000/2003)

    I have column B formatted as a date. I as using custom 'ddd'. I want to highlight the current cell (that contains) the formula below,if it is equal to Sat or Sun.
    I tried the following formula but it always returns false (because b9 is a date),
    How can I change the formula to make it highlight the cell if the date, in b9, is equal to Sat or Sun.

    =OR(B9="Sat",B9="Sun")

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Conditional Format Day Formula (2000/2003)

    Try =WEEKDAY(B2,2)>5
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Format Day Formula (2000/2003)

    The ddd format only determines how the cell is displayed on screen, the underlying value is still the complete date. Try this formula:

    =WEEKDAY(B9,2)>5

    The WEEKDAY function with second argument 2 returns 1 = Monday, 2 = Tuesday, ... 7 = Sunday. So if the value is more than 5, it must be a Saturday or Sunday.

  4. #4
    2 Star Lounger
    Join Date
    Jan 2007
    Location
    Gray, Louisiana, USA
    Posts
    289
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Format Day Formula (2000/2003)

    That did the trick, thanks

  5. #5
    2 Star Lounger
    Join Date
    Jan 2007
    Location
    Gray, Louisiana, USA
    Posts
    289
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Format Day Formula (2000/2003)

    Good explanation I understand now. thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •