+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting formula IF TODAY Between range of dates, color cell red

  1. #1
    Registered User
    Join Date
    11-29-2013
    Location
    Pattaya, Thailand
    MS-Off Ver
    Excel 2013
    Posts
    71

    Conditional Formatting formula IF TODAY Between range of dates, color cell red

    Hello,

    I'm trying to CF a cell with today's date based on a range of dates in 2 other columns. I've got it to work with a helper cell, but the formula is long and I think it should be easier than this. I don't really need to display today's date in that cell, I just want to CF the cell if today falls between a range of dates.

    Today's date cell is C13
    The date ranges are in column H and I, and run from row 6 to 15

    At the moment I use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    To tell if Today (C13) falls between any dates. This returns a value of 1 or 0 which I then use to CF cell C13 with an =IF formula.

    Can anyone tell me a formula that eliminates the unnecessary formulas?

    Thanks,

    Michael.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Conditional Formatting formula IF TODAY Between range of dates, color cell red

    May be this....

    IF(C13<>"",SUMPRODUCT((C13>=H6:H15)*(C13<=I6:I15)),0)

    Or

    =IF(C13<>"",COUNTIFS(H6:H15,">="&C13,I6:I15,"<="&C13),0)
    Last edited by :) Sixthsense :); 12-31-2013 at 01:00 AM.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    11-29-2013
    Location
    Pattaya, Thailand
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Conditional Formatting formula IF TODAY Between range of dates, color cell red

    mmm, that doesn't seem to do much sixthsense. I've put it in a CF rule that applies to C13, but no CF happens to it if I set the dates in H6 and I6 to something that should trigger the CF in C13 to try it out.

    Also, is "C13>=H6:H15)*(C13<=" correct with the >= on one side and <= on the other?

    Not sure if I was clear enough on the date-ranges, so I'll clear that up:
    Column H has start dates, and Column I has end-dates.

    it's easy enough to CF C13 between H6 and I6 alone, but I have a range of dates and I'm hoping I could apply a formula on the range instead of individual cells.

    Thanks,

    Michael.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Conditional Formatting formula IF TODAY Between range of dates, color cell red

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

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

    View Pic

  5. #5
    Registered User
    Join Date
    11-29-2013
    Location
    Pattaya, Thailand
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Conditional Formatting formula IF TODAY Between range of dates, color cell red

    Just checked again, and for some reason there were brackets in the formula I pasted : ="IF(C13<>"""",SUMPRODUCT((C13>=H6:H15)*(C13<=I6:I15)))"

    Just removed the brackets and it works fine now.

    Next thing I'll do is try to replace C13 with TODAY, because then I won't need to have any existing value in that cell to start with.

    Thanks for helping, I'll mark the thread solved.


    Cheers,

    Michael.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Conditional Formatting formula IF TODAY Between range of dates, color cell red

    Glad you fixed it and thanks for the feedback and rep

+ 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. Replies: 3
    Last Post: 11-20-2013, 08:42 AM
  2. [SOLVED] Conditional Formatting Formula - Chang color of cells is other cell is equal to..
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 6
    Last Post: 09-29-2013, 11:00 PM
  3. Replies: 2
    Last Post: 07-01-2013, 05:01 PM
  4. [SOLVED] Conditional Formatting of: dates within 1 month and dates before today.
    By Luke Smith in forum Excel General
    Replies: 5
    Last Post: 06-18-2013, 07:29 AM
  5. Replies: 0
    Last Post: 01-31-2011, 06:32 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