+ Reply to Thread
Results 1 to 5 of 5

Excel formula to count date backward and color cell

  1. #1
    Registered User
    Join Date
    06-27-2014
    Location
    Canada
    MS-Off Ver
    365
    Posts
    4

    Excel formula to count date backward and color cell

    Hello,

    I am trying to color cells based on the Excel formula, so if there are two dates, e.g. Jul 1, 2023, and April 1, 2023, the Excel cells will color backward based on the duration selected?
    Anyway, can this be done using conditional formatting?

    Thanks!
    Attached Images Attached Images
    Last edited by Eaton; 10-31-2023 at 11:46 PM.

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,656

    Re: Excel formua to count date backward and color cell

    If all dates were real date (formatted as "mmm-yyyy"), you can use Conditionaing formatting, like this:
    In D2 (suppose D1="Jan-23", A2 and B2 is start-end date)
    Home/Conditional Formating/New Rule/USe a formula...
    =AND(D$1>=$A2,D$1<=$B2)
    Apply to whole table
    P/S: You may actual want START is smaller date (Apr-2023) and END is larger (Jul-2023). Change it!
    Quang PT

  3. #3
    Registered User
    Join Date
    06-27-2014
    Location
    Canada
    MS-Off Ver
    365
    Posts
    4

    Re: Excel formua to count date backward and color cell

    Thank you so much, bebo021999!
    This worked like a charm. Now if I want to use the duration to control the date, the cell color doesn't update but if I manually change the START date it works ,any suggestions?
    I have uploaded a copy for reference.
    Thanks again, and appreciate the fast response!
    Attached Files Attached Files

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,656

    Re: Excel formula to count date backward and color cell

    It seems like there is no reference to the START date (cell A2) any more, and the START date will be END DATE - 2 months?

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-27-2014
    Location
    Canada
    MS-Off Ver
    365
    Posts
    4

    Re: Excel formula to count date backward and color cell

    It worked this time. I appreciate the help.
    Thanks again!

+ 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] Count color cell in defined date range (Difficult)
    By PNick in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-19-2023, 12:59 PM
  2. [SOLVED] Count backward neighboring/frequency numbers
    By Gulya in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-13-2021, 04:47 AM
  3. Count Cells in Date Range and Cell Color (using VBA)
    By newoak14 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-28-2021, 09:37 AM
  4. Count Cells in Date Range and Cell Color (using VBA)
    By newoak14 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-27-2021, 09:05 PM
  5. How do you count consecutive values backward from the last cell?- Please help!
    By asseenontv in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-26-2015, 02:58 PM
  6. Need Macro/Formua which will help in counting the colored cells with same color.
    By @jerry in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2015, 01:55 PM
  7. [SOLVED] excel count cell with color conditional formatting
    By Marco in forum Excel General
    Replies: 6
    Last Post: 11-20-2005, 01:00 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