+ Reply to Thread
Results 1 to 8 of 8

Conditional Formatting to color one cell based on a month from a date in another cell

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    Owosso, Michigan
    MS-Off Ver
    Excel 2016
    Posts
    4

    Conditional Formatting to color one cell based on a month from a date in another cell

    This is similar to a previous post that showed for a date range. I need by a month range.

    I need it to look at a field (A5) and if the date is between January and March to make the cell one color, if the date is between April and June to be a different color. I did similar to what you did above and it accepts it, but doesn't color the cell.

    =AND($A$5>=MONTH(1), $A$5<=MONTH(3))

    I also have fields that have a formula that enters a month and year based on a date in a cell. This month and year changes based on the date. Could be January, could be November, but I need the cell to fill with a particular color based on the month/quarter in which it fills with. Used the same formula as above.

    You're help is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: Conditional Formatting to color one cell based on a month from a date in another cell

    The conditional rule needs to be worded differently
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    EDIT: Sorry, it seems you need various conditional fomatting in the same range. I'll upload a sample in a jiff if anybody hasn't helped you by that time.
    Last edited by ron2k_1; 04-27-2018 at 01:54 PM.
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  3. #3
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: Conditional Formatting to color one cell based on a month from a date in another cell

    See if the attached is what you were aiming for.

    What role does the date on A5 play? I didn't use that date at all on the conditional formatting rules on B14:N14

    Secondly, I couldn't do anything with cells C9:C12 because they are not real dates.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-29-2012
    Location
    Owosso, Michigan
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Conditional Formatting to color one cell based on a month from a date in another cell

    A5 is the cell I need the formulas to look at. Cell A5 is the date we Exit a client and it's the date I need to use to determine what Quarters need to be highlighted. The 1st quarter after exit is Yellow, 2nd is orange, 3rd is red, and 4th is blue.

    I know what I'm asking for is a stretch and more then likely impossible. I attached a sample of each quarter to show how I need the coloring to be based on the date in cell A5.

  5. #5
    Registered User
    Join Date
    08-29-2012
    Location
    Owosso, Michigan
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Conditional Formatting to color one cell based on a month from a date in another cell

    Ok. I managed to get part of what I want to work. See attached. The center section works the way I want. Colors for each section change how I need it to based on the date in A5. But now the lower section (Contact Mon/Year) is not working correctly for each quarter. The highlight colors for the lower section need to match the highlighted colors in the middle section. It's right for the Quarter of January 01 - March 31, the rest are off. See Samples in previous message.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Conditional Formatting to color one cell based on a month from a date in another cell

    This proposed solution employs seven helper columns which have been moved to the far right of the sheet for aesthetic purposes.
    The first two helper columns are manually populated with months and quarters (formatted Qtr 0)
    The third helper column is populated using: =MONTH(A$5)=XEX2
    The forth through seventh helper columns are populated using formulas similar to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The formulas used as conditional formatting rules are similar to: =COUNTIFS($XFD2:$XFD13,B14)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    08-29-2012
    Location
    Owosso, Michigan
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Conditional Formatting to color one cell based on a month from a date in another cell

    Oh Wow! Thank you! That's perfect! I would never have thought of doing it that way. This saves us sooo much work of having to manually change the colors everytime we create this form for each client (several hundred a year).

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Conditional Formatting to color one cell based on a month from a date in another cell

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools drop down in the ribbon above your first post. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Conditional Formatting formula to color one cell based on a date range in another cell
    By katiedee1625 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2018, 08:52 AM
  2. Add conditional formatting based on color of a cell
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2015, 04:54 AM
  3. Replies: 5
    Last Post: 12-07-2013, 02:21 PM
  4. Replies: 3
    Last Post: 11-08-2013, 03:10 PM
  5. Replies: 1
    Last Post: 10-09-2013, 05:05 PM
  6. Replies: 5
    Last Post: 05-10-2012, 10:49 PM
  7. [SOLVED] Conditional Formatting, current cell color follows to diff cell based on content
    By iallenwood in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2012, 04:13 PM

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