+ Reply to Thread
Results 1 to 5 of 5

Date Conditional format

  1. #1
    Forum Contributor
    Join Date
    10-14-2007
    MS-Off Ver
    Excel 2021
    Posts
    121

    Date Conditional format

    How do i conditional format a column of dates so that every week it alternates colors.

    Example. Week 1 data would be blue, Week 2 data would be red, Week 3 data would turn back to blue.

    Thanks for any suggestions
    Impala096

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    Can you explain a bit more. What dates do you have, are you showing a list of consecutive dates, for what period of time. What day does a new week start, Monday, Sunday?

  3. #3
    Forum Contributor
    Join Date
    10-14-2007
    MS-Off Ver
    Excel 2021
    Posts
    121
    I will be using it to track certain stocks throughout the course of a week. However, i won't have data present every day with some weeks being completely skipped in which i would want the color to still alternate.

    I attached a spreadsheet that further details what i'm trying to accomplish.
    Attached Files Attached Files

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699
    For your example...select your dates B2:B11

    and use conditional formatting with this formula for condition 1

    =MOD(SUM(IF(FREQUENCY(B$2:B2-WEEKDAY(B$2:B2,3),ROW(INDIRECT(B$2&":"&B2)))>0,1)),2)

    format as required

    and for condition 2

    =MOD(SUM(IF(FREQUENCY(B$2:B2-WEEKDAY(B$2:B2,3),ROW(INDIRECT(B$2&":"&B2)))>0,1)),2)=0

    format as required

  5. #5
    Forum Contributor
    Join Date
    10-14-2007
    MS-Off Ver
    Excel 2021
    Posts
    121
    Hi there,

    Thanks so much for your formula. It seems to work perfectly. No idea how you got it but it worked!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1