+ Reply to Thread
Results 1 to 3 of 3

Condition Formatting: Change color when month change (oct = red, Nov = blue)

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    25

    Condition Formatting: Change color when month change (oct = red, Nov = blue)

    I have a column of cells that contain the start dates of weeks starting with 1-Oct-12 all the way out to 30-Dec-13. I want to change the colors of the cells so that all of each month have one color.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Condition Formatting: Change color when month change (oct = red, Nov = blue)

    Assuming data is in A2:A1000, select range
    Conditional Formatting> New Rule> Use formula
    =AND(ISNUMBER(A2), MONTH(A2)=1) Format for January
    repeat form 2, 3,...12
    Does that make sense?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Condition Formatting: Change color when month change (oct = red, Nov = blue)

    If it's the same text format all the way down (dd-mmm-yy) you could use a formula for the formatting, one per month

    Where B2 is a cell you want formatted, create a conditional format with the following
    =(LEFT(RIGHT(TEXT(B2,"mmm"),6),3))="Oct"

    Make one for each month with different colors, copy the formatting down the data

    This is probably not the best way to do this, but it seems to work!

+ 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