+ Reply to Thread
Results 1 to 13 of 13

Cell Color Based on the Day of the Month.

  1. #1
    Registered User
    Join Date
    05-02-2014
    Location
    U.S.
    MS-Off Ver
    Excel 2010
    Posts
    5

    Cell Color Based on the Day of the Month.

    Hello, I am looking to format a cell color based on a day of the month, if "Today" is close to or past a certain day of the month.

    I have a spreadsheet for my Budget. I have items like Credit-Cards, Utilities in each Row, and I have a Column for Budgeted, and Actual amounts.
    I want to have the cell for (Discover, Visa, etc.) change color when it’s getting close to and past the due day.

    I want it to turn yellow if "Today" is within say 6 days from now/today, and then turn Red if Today is within 2 days from now, and stay Red until something is entered in the “Actual” cell that is next to it.

    (e.g. If Discover is due on the 10th or 10th Day of each month then the cell will turn Yellow on the 4th Day, and then turn Red on the 8th Day, and stay Red until I enter my Payment Amount in the “Actual” Column for that Row.)

    I hope I have given a good explanation of what I am trying to do.

    Thanks for the help.
    Steve

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Cell Color Based on the Day of the Month.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Cell Color Based on the Day of the Month.

    Welcome to the forum

    See if this gives you ideas to work with...
    Open conditional formatting to view setup...
    Attached Files Attached Files
    Regards,
    Rudi

  4. #4
    Registered User
    Join Date
    05-02-2014
    Location
    U.S.
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Cell Color Based on the Day of the Month.

    Hello, Here is a sample worksheet.. I've just manually colored the cells.

    You see Today's Date at the top of the sheet. and if the Discover and Car Loan payments were due in 2 days or less for both, they would be Red.
    And Visa and Debt1 are due in 6 days or less so they are Yellow.
    And Debt2 isn't due until the 18th so it the neutral color.

    Thanks
    Steve
    Attached Files Attached Files

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Cell Color Based on the Day of the Month.

    What are the due dates for the various expenses?

  6. #6
    Registered User
    Join Date
    05-02-2014
    Location
    U.S.
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Cell Color Based on the Day of the Month.

    hhhmm.. I was wondering if the formula/statement could be vague, as in, if the Discover Card was due on the 4th of every month.
    Then the formula maybe
    IF CURRENT DAY OF MONTH is within 6 days of the 4th Day THEN YELLOW and
    IF CURRENT DAY OF MONTH is within 2 days of the 4th Day THEN RED..

    hhhmm... Does this even make sense???
    I’m trying to write it out and can’t seem to make it, make sense..

    Thanks for the help

  7. #7
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Cell Color Based on the Day of the Month.

    Hi Steve, try these in E19. I see you've got quite a few merged cells, maybe you'll need to do some experimenting to get the CF right. Unmerge the date cells C1 & D1, put your text in C1 & today() in D1
    For 2 days before. Change the RED digits for a different day, the BLUE digits for a different lead up time
    Please Login or Register  to view this content.
    For 6 days before
    Please Login or Register  to view this content.
    In case you don't pay your bill on time
    2 days before & 2 days after
    Please Login or Register  to view this content.
    6 days before & 2 days after
    Please Login or Register  to view this content.
    Hope I got them right. Dates are finicky at the best of times
    Cheers
    Phil
    Last edited by Philb1; 05-03-2014 at 12:50 AM. Reason: Forgot a bit

  8. #8
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Cell Color Based on the Day of the Month.

    See attached based on your sample file...
    You need to have a column of "Pay By" dates so that you can determine the deadline for Discover, or Visa, etc...
    Conditional formatting uses these dates to determine the colours for the cells.

    That is of course assuming that each item has a different Pay By. Else just change all those dates to the same date...but then all cell colours will show the same.
    Attached Files Attached Files
    Last edited by RudiS; 05-03-2014 at 03:40 AM.

  9. #9
    Registered User
    Join Date
    05-02-2014
    Location
    U.S.
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Cell Color Based on the Day of the Month.

    Hi Phil, Those work great.. Awesome.. Thanks!!!

    Question, How do I get Both the 2-Day RED, and the 6-Day YELLOW rules to work on one cell at the same time?
    I can only seem to get one rule work at a time. I'm testing by changing the date on my computer..

    Thanks again.
    Steve

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Cell Color Based on the Day of the Month.

    It is a case of being one condition or another but not both at the same time. What kind of effect would you be wanting?

  11. #11
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Cell Color Based on the Day of the Month.

    Hi Steve.. Glad they're working for you
    I've changed them a little bit so they're not reliant on getting a date from D1. I've also attached your workbook with test formulas entered in D19:E19 which I think work as you want. If you're happy with them as they are you can copy over the finalised formulas from here or from the worksheet. You'll see what I mean
    Cheers
    Phil
    2B4-2After
    Please Login or Register  to view this content.
    6B4-2After
    Please Login or Register  to view this content.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    05-02-2014
    Location
    U.S.
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Cell Color Based on the Day of the Month.

    Hi Phil, thanks a ton... That's the effect I was looking for.

    I had a feeling that it could be done, I just couldn't get there from here.
    I've done a bit of VB coding in Access, using Access as a Front-end to a SQL Database Back-end.
    Its been about 6 or 7 years, and you're right working dates was always finicky.

    Thanks to everyone who contributed.

    Thanks again Phil, "You-Da-Man"
    Steve

  13. #13
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Cell Color Based on the Day of the Month.

    All good Steve, glad it's working

+ 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. 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
  2. [SOLVED] 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
  3. [SOLVED] Color-format a cell which contains data in a column based on the color of another cell
    By Nit3hawK in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-27-2013, 05:25 PM
  4. Replies: 5
    Last Post: 05-10-2012, 10:49 PM
  5. Auto Cell Color for each month
    By malvdh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2009, 04:10 PM

Tags for this Thread

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