+ Reply to Thread
Results 1 to 14 of 14

Conditional Formatting based on between dates and a word in another cell

  1. #1
    Registered User
    Join Date
    06-08-2018
    Location
    Reno, NV
    MS-Off Ver
    2016
    Posts
    6

    Conditional Formatting based on between dates and a word in another cell

    Interlocal and Services.JPG

    What I want to do is have Conditional Formatting look to see if the Ending(B2) date is 90 days from now and if the Type(C2) is Interlocal, if so highlight the cell. I want Conditional Formatting to look to see if the Ending(B2) date is 180 days from and if the Type(C2) is Services, highlight the cell. Then I want it to shut off after Today has passed.

    I can change the highlighting of the date on and off based on if it is 90 days from now and if today has past, but then that doesn't give me if it is Interlocal or Services. I used Conditional Formatting Cell Value between =TODAY()+90 AND =TODAY() to turn on the start of the 90 days and turn off after today has passed. It worked in the date field, but nothing is working if I have it in the Type field and use other formulas.

    Past this I am lost.

    Any help would be great, I am new to this posting.
    Thank you
    Attached Images Attached Images

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting based on between dates and a word in another cell

    Hi, welcome to teh forum

    Rather than a pic, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    From the sounds of it though, you need something like...
    =and($B2+90<=today(),c2=Interlocal")

    Keep in mind, CF just needs a TRUE (1) or FALSE (0) answer to work
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Conditional Formatting based on between dates and a word in another cell

    Perhaps use a formula in your CF rather than Between.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If that doesn't do what you need then attach a sample workbook with your expected results manually highlighted.

    BSB

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting based on between dates and a word in another cell

    BSB picked up a condition that I missed (thanks) - testing for >= today

  5. #5
    Registered User
    Join Date
    06-08-2018
    Location
    Reno, NV
    MS-Off Ver
    2016
    Posts
    6

    Re: Conditional Formatting based on between dates and a word in another cell

    Interlocal and Services.JPG
    Thank you for all your help, I can't find a way to upload a worksheet in a reply and it wasn't working earlier?
    I have attached a picture of what it should look like when finished, based on Interlocal is 90 days and Services is 180.
    I can't get it to work with either formula?
    I had this one working for 90 days, but it wouldn't base it on the type and didn't shut off after todays date, but I messed it up somewhere along the line?
    =AND(ISNUMBER(H1),H1>TODAY()+90)

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,497

    Re: Conditional Formatting based on between dates and a word in another cell

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting based on between dates and a word in another cell

    You are referencing H1, but it looks like your dates are in B?

  8. #8
    Registered User
    Join Date
    06-08-2018
    Location
    Reno, NV
    MS-Off Ver
    2016
    Posts
    6

    Re: Conditional Formatting based on between dates and a word in another cell

    I think I got how to get the file up now, Thank you AliGW
    I am still not getting the formula
    Book 2 shows how I want it.
    Interlocal from today to 90 days from today should show in Green so from 06/05/18-09/05/18 should be highlighted in Green, only the word "Interlocal".
    Services from today to 180 days from today should show in Yellow so from 06/05/18-12/05/18 should be highlighted in Yellow, only the word "Services".

    With help from FDibbins and BSB its on the right path, but it seems that it is not picking the right dates or colors correctly?
    Book one shows where the highlighting should be located in column B and the conditional formatting (what it is actually doing) column C.

    It appears there is still something missing?
    Attached Files Attached Files
    Last edited by IZANEEDHELP; 06-08-2018 at 06:20 PM.

  9. #9
    Registered User
    Join Date
    06-08-2018
    Location
    Reno, NV
    MS-Off Ver
    2016
    Posts
    6

    Re: Conditional Formatting based on between dates and a word in another cell

    Sorry I cleaned up the data to simplify it. H1=B1
    I think my last post will clarify.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting based on between dates and a word in another cell

    Quote Originally Posted by IZANEEDHELP View Post
    Interlocal from today to 90 days from today should show in Green so from 06/05/18-09/05/18 should be highlighted in Green, only the word "Interlocal".
    Services from today to 180 days from today should show in Yellow so from 06/05/18-12/05/18 should be highlighted in Yellow, only the word "Services".
    Today is 6/8, so the 1st 2 rows (at least) no longer qualify because of the date, had you considered that?

  11. #11
    Registered User
    Join Date
    06-08-2018
    Location
    Reno, NV
    MS-Off Ver
    2016
    Posts
    6

    Re: Conditional Formatting based on between dates and a word in another cell

    FDibbins I did just consider that but it still is not picking the right dates and the color is overlapping? I did notice that I said yellow in one sheet and have it green in another.
    So I am not getting why when
    I want Services to go from today to today + 180days and turn yellow, it is picking from 10/05/18- 03/05/19 and picking green
    =AND($B2>=TODAY(),$B2>=TODAY()+180,$C2="Services")

    I want Interlocal to go from today to today + 90days and turn green, it is picking from 11/05/18 -02/05/19 and picking yellow.

    =AND($B2>=TODAY(),$B2>=TODAY()+90,$C2="Interlocal")

    And there is overlapping of the color on two of them?

    Is this a calendar thing?
    Attached Files Attached Files

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting based on between dates and a word in another cell

    This formula seems to work for me...
    =AND($B2>=TODAY(),$B2-90<=TODAY(),C2="Interlocal")

  13. #13
    Registered User
    Join Date
    06-08-2018
    Location
    Reno, NV
    MS-Off Ver
    2016
    Posts
    6

    Re: Conditional Formatting based on between dates and a word in another cell

    Thank You FDibbins
    As you can see from my attachment(Book1) it still is not working?

    I attached a version of what my data looks like and it seams to pick random items to highlight?(Book4)

    I don't know what to do other than run the conditional formatting off of Column B, then make them sort manually by "Interlocal" and "Services"?

    Thanks for all your help I have been trying to get this to work most the day and it is not working no matter what I do?
    Attached Files Attached Files

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Conditional Formatting based on between dates and a word in another cell

    OK, I found what was going wrong.

    Your CF range is C:C (never a good idea to use a full-column range for CF anyway.
    Change that range to
    =$C$2:$C$5000
    and then use this formula (basically the same as you had, I just locked C2)
    =AND($B2>=TODAY(),$B2-90<=TODAY(),C2="Interlocal")

+ 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 based on either a word, a letter or a number
    By Cidona in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 12-11-2017, 11:11 AM
  2. [SOLVED] Conditional Formatting based on given dates
    By fizzwolf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2017, 12:20 PM
  3. Replies: 8
    Last Post: 05-01-2015, 02:07 PM
  4. [SOLVED] Conditional formatting based on a word in a cell
    By dprobst in forum Excel General
    Replies: 2
    Last Post: 08-22-2014, 08:05 AM
  5. Replies: 8
    Last Post: 05-07-2014, 04:57 AM
  6. Need help with Conditional Formatting based on DATES
    By celeliza in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-23-2012, 09:53 AM
  7. Replies: 1
    Last Post: 08-17-2012, 08:16 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