+ Reply to Thread
Results 1 to 18 of 18

I need cell to automatically change color based on date in different cell

  1. #1
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Question I need cell to automatically change color based on date in different cell

    I am setting up a deadline sheet and I would love it if I could get the projects to change color based on how close they are to deadline. I really only require green, yellow and red. So for example, if A2 is 9/20/2013 and the date is 9/1/2013, I would like B2, C2, D2 and E2 to be green. when today's date is 9/10, I would like them all to change to yellow and when the today's date is 9/20 or beyond I would like the cells to change to red.

    is this too complicated or can it be done? I am a complete novice, so thank you all in advance!

  2. #2
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: I need cell to automatically change color based on date in different cell

    You can use conditional formatting for this and select "use a formula to determine which cells to format": =B2>$A$2 (format fill color as red), =B2=$A$2 (format fill color as yellow), =B2<$A$2 (format fill color as green)

    Make sure the range is B2:E2. You can ensure the correct range by highlighting all cells that need to be colored before clicking on conditional formatting. Or you can change it in the conditional formatting menu.

  3. #3
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    That looks like what I need except for one detail, I would like it to turn yellow 10 days before the deadline. then on or after the deadline turn red. I may be wrong, but the way I see this formula is that it will turn yellow ON the deadline then red after and any day prior to deadline is green? Thanks for the quick help BTW!

  4. #4
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: I need cell to automatically change color based on date in different cell

    Okay, use this:
    green: =B2<($A$2-10)
    yellow: =AND(B2>=($A$2-10),B2<$A$2)
    red: =B2>=$A$2

    *sorry, initially used row 1 instead of row 2
    Last edited by jeffr27; 08-26-2013 at 10:52 AM.

  5. #5
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    All in the same formula or in different conditions? Sorry, I did announce that I am a newb, lol

  6. #6
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: I need cell to automatically change color based on date in different cell

    No worries. We all start at the same place, just not at the same time. Each of the formulas need to be in a "New Rule". And just use the formula part, starting with the = sign. You'll see a button that says "Format..." and then select the "Fill" tab and pick your colors (green, yellow, or red).

    This is using Excel 2010. I'm not sure how other versions may be different, but the gist is the same.

  7. #7
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    Jeff, Thank you! I appreciate the help!

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

    Re: I need cell to automatically change color based on date in different cell

    I entered =today() in A1 and down the column A I entered dates from the past into the future so that overdue dates could be clearly shown.

    The enclosed file shows my interpretation of how I understand your requirements.

    The dates that I entered are in date order but that was only for convenience.
    Attached Files Attached Files
    <---------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

  9. #9
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    What I need is a combination of the two answers I received. This is how it is set up
    Under A starting with row 2 I have a series of dates. 09/16/2013 - 09/20/2013 in columns b - f I have 5 people. under each name I will put in a project tobe due on a date in column A. I want the cells with projects in them to change from green to red depending on how close they are to the date in colum A. I don't want to have to enter the date in each field I want formatted. I just want to be able to open the spreadsheet and see that the project is close to the due date or overdue. it's not a huge deal right now, but as I add more writers to my staff, I can imagine this would be a valuable tool.

    Also, once I have the color thing straight, is there a way to add a check box to say that the project is complete and keep the current color so I can see patterns? Like if people constantly cut it close to deadline, then I could see that by looking at the sheet?

  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: I need cell to automatically change color based on date in different cell

    I don't understand these latest requirements at all. It seems that you have personnel in columns B to F and dates relating to them in column A.

    An example of what the finished project should look like would be a great asset otherwise I just don't know what it is that you want.

  11. #11
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    So as we get closer to 9/16 Work would go from green to yellow. Then when 9/16 is past, it would turn red.

    The last peice of the puzzle is this... once the assignment is handed in, I would like an indicator. like a check box, just so I know its in. this would also turn off formatting, like (if box is checked, no formatting)

    But I am just focused on the formatting by date thing for now. I hope this helps, I can't upload images from work pc.



    Tommy F. | Mike B. | Rob G. | John D.
    9/16/2013 | work | | |

    9/17/2013 | | Project | |

    9/18/2013 |

    9/19/2013 |

    9/20/2013 |

  12. #12
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    that looks horrible.

    do I need to wait until I get home?
    lol. If you have an e-mail address I can forward a copy of the sheet I am working on

  13. #13
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: I need cell to automatically change color based on date in different cell

    I would refrain from using check boxes because I believe you'll have to get into VBA coding to make it work how you want it to. My advice is instead of check boxes, make a new column for a "completion date". This way you can still use conditional formatting. I've created a dummy spreadsheet to show you. Example1.xlsx Note: I've only done the conditional formatting for the first person.

    *In my rush, I forgot to clean up the spreadsheet. Please ignore rows 10-14. Rows 16-20 hold the formulas that the conditional formatting uses.

  14. #14
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: I need cell to automatically change color based on date in different cell

    A question just popped into my head... what if there is no project due that day? Did you want it to remain blank, or will there always be something due?

  15. #15
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    Exactly, if there is no project it would be light blue

  16. #16
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: I need cell to automatically change color based on date in different cell

    See attached again. I know you previously said you didn't want to enter more dates, but adding a completion date is the only way that I know of without using vba.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    08-26-2013
    Location
    RI, USA
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: I need cell to automatically change color based on date in different cell

    http://www.winningmark.com/2012/01/1...ple-deadlines/

    this is a link to something I found that is real close to what I'm looking for, only it is way more complicated than I need it to be. I only need the first section really. I like the way it is set up. If you could distill that down to what they have in columns a-d and add the "completed (yes/no)" collum, that would be fantastic.

    Again, thank you guys for all the help, excel is not my thing... I'm a story teller.

  18. #18
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: I need cell to automatically change color based on date in different cell

    Okay... take a look at this:

    First off, for this to work, you have to have Iterations box checked. If Excel 2010 - click File, Options, Formulas, Enable iterative calculation (checked), and set Maximum Iterations: to 1. If you have an earlier version of Excel, I think it's under Tools -> Options -> Calculations.

    Columns G, H, and I can be deleted - these hold the same formulas as the conditional formatting and it was just for me to visualize how the formulas work.

    Column F (TimeStamp) cannot be deleted. However you can hide this column by right-clicking on the F and selecting "Hide". This way you'll never see the dates. Essentially, this puts the current date and time as soon as anything gets entered in Column E (and I mean anything, you could write "no", and it would still count). If you delete a response "y" or otherwise in column E, the corresponding time-stamp will also be reset.

    The reason a second date field is necessary, such as a time stamp, is because without it, the conditional formatting cells would all eventually turn to red because due dates will eventually be in the past, and so you'll never know if people turn projects in early, or wait til the deadline. It's that second part of the process, keeping the color the same based on when the project is completed - that's where we need to compare the due date to the completion date (or in this case, the TimeStamp). There may be a way to do it with macros or vba code, I just don't know how, but here's a resource I was looking at. http://www.mcgimpsey.com/excel/timestamp.html

    This is currently set up for 1000 rows. After row 1000, you'll have to click and drag cells A1000 and F1000 down.
    Attached Files Attached Files

+ 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. Change Cell color based on different cell value and three date ranges
    By Erkden in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2013, 11:13 PM
  2. [SOLVED] Macro to automatically change tab color to red base on a cell date
    By Chaunceycat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2012, 07:53 PM
  3. Having Cell Color Change Automatically Based on Value
    By jamesfedwards in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-21-2006, 10:47 AM
  4. Replies: 1
    Last Post: 04-03-2006, 12:10 AM
  5. Font to change color automatically based on value in cell.
    By mtwelsh72 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2005, 03:06 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