+ Reply to Thread
Results 1 to 4 of 4

fill cell with color based on cell value

Hybrid View

k1dr0ck fill cell with color based on... 05-31-2016, 10:28 PM
FlameRetired Re: fill cell with color... 05-31-2016, 11:15 PM
k1dr0ck Re: fill cell with color... 06-01-2016, 01:13 AM
FlameRetired Re: fill cell with color... 06-01-2016, 04:37 PM
  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2021
    Posts
    979

    fill cell with color based on cell value

    hi,

    i have dates on (b2:z40) how do i automatically fill the cells with color (yellow or light green) which has the same month-year as the current month-year everytime i open the file

    example:
    all the cells of (b2:z40)with month-year of june 2016 will be color filled since the current month-year is june 2016

    how do it also auto update when july 2016 comes and the cells that will be color filled will now be the cells with the month-year of july 2016 value
    the previous color filled for the previous month-year will be removed
    Last edited by k1dr0ck; 05-31-2016 at 10:32 PM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: fill cell with color based on cell value

    Use Conditional Formatting.

    Select B2:Z40.

    Click Home / Conditional Formatting / New rule.

    Choose Use formula to determine which cells to format.

    Then in the formula box this formula
    Formula: copy to clipboard
    =AND(YEAR(TODAY())=YEAR(B2),MONTH(TODAY())=MONTH(B2))


    Click the Format button / click the Fill tab and select the color you wish. Click OK all the way out.
    Attached Files Attached Files
    Last edited by FlameRetired; 05-31-2016 at 11:18 PM.
    Dave

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2021
    Posts
    979

    Re: fill cell with color based on cell value

    thank you works great

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: fill cell with color based on cell value

    Thanks for the feedback and rep. :

    Had an afterthought.

    This formula is simpler and better IMPO.

    Formula: copy to clipboard
    =AND(B2>EOMONTH(TODAY(),-1),B2<=EOMONTH(TODAY(),0))

+ 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] How to fill color cells based on another cell's fill color?
    By putritersenyum in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-22-2016, 08:58 AM
  2. Replies: 1
    Last Post: 12-17-2015, 07:03 AM
  3. Specific number of cell to fill with color based in a dynamic cell range
    By Blue_Wings in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-01-2015, 09:46 AM
  4. Specific number of cell to fill with color based in a dynamic cell range
    By Blue_Wings in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2015, 10:10 AM
  5. Macro to change cell text color based on darkness of cell fill color
    By cincyshirm61 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 12:11 PM
  6. change fill color of a range of cells based on color of a cell?
    By DarMelNel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2014, 04:48 PM
  7. Replies: 2
    Last Post: 09-15-2010, 11:59 AM

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