+ Reply to Thread
Results 1 to 17 of 17

Change color of cells based on expiry date

  1. #1
    Registered User
    Join Date
    02-17-2014
    Location
    Tanajib, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Change color of cells based on expiry date

    Hello everyone.

    I've seen one or two other threads with similar problems but aren't quite helping me solve mine.

    I have two columns, one with the expiration dates and the other next to it with a "In date / out of date" assessment.
    Getting the "In date / out of date" column to say whether it's in or out is done using IF conditionals, but I would like the cell
    background to change to green in date and red out of date, would make checking entire systems easy, at a glance.

    I hope this all makes sense and thank you to everyone in advance.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Change color of cells based on expiry date

    Conditional formatting is what you need..

    Can you attach a sample Workbook?

    Deep
    Cheers!
    Deep Dave

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Change color of cells based on expiry date

    how does the IF formula know if an indate or an outdate

    as far as excel cell is concerned, it will just be a date (i assume)
    and so how you populate that date based on if IN or OUT will depend on the rules in the IF statement
    OR
    do you have on the cell next to the date - the words "in date" or "out date"

    a sample spreadsheet attached would also help
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    02-17-2014
    Location
    Tanajib, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Change color of cells based on expiry date

    Hi Guys

    Wow, thanks for the quick response. See attached sample. Would like "out of date"=red and "in date"=green
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-07-2013
    Location
    dubai
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Change color of cells based on expiry date

    use conditional formatting with text on the columns that have the in date/out date values.

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Change color of cells based on expiry date

    for 2007 or 2010 excel version
    Conditional Formatting

    Highlight applicable range >>

    Column G


    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:


    =G1="in date"


    Format… [Number, Font, Border, Fill] use fill green
    choose the format you would like to apply when the condition is true
    OK >> OK

    repeat for
    =G1="out of date"
    and use fill red

    see attached
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-17-2014
    Location
    Tanajib, Saudi Arabia
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Change color of cells based on expiry date

    etaf you are a rock star, you've really saved me.

    Thanks very much

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Change color of cells based on expiry date

    your welcome, thanks for the rep

  9. #9
    Registered User
    Join Date
    03-07-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    10

    Re: Change color of cells based on expiry date

    Hey guys

    Still having problem with this formatting.... even i enter an old date, the colour doesnt change...... can you please help.... have an audit coming up and i', dead !!!

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Change color of cells based on expiry date

    can you upload the spreadsheet with the issue in

  11. #11
    Registered User
    Join Date
    03-07-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    10

    Re: Change color of cells based on expiry date

    how to upload here?

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Change color of cells based on expiry date

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  13. #13
    Registered User
    Join Date
    03-07-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    10

    Re: Change color of cells based on expiry date

    done i have attached it////
    Attached Files Attached Files

  14. #14
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Change color of cells based on expiry date

    so thats different to the original question
    and as a diffrent user - you should really start a new thread of your own
    and then in the sample

    Would like to see a manual mock up of the expected results you want to achieve.

    Asking questions in other peoples threads gets confusing , as indeed I did by not looking closely at the "thread starter"

  15. #15
    Registered User
    Join Date
    03-07-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    10

    Re: Change color of cells based on expiry date

    im sorry mate, but im new to this stuff. was trying to find a soultion on the net. came across this and just replied....

  16. #16
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Change color of cells based on expiry date

    no problem - create a new thread and I will answer there

  17. #17
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Change color of cells based on expiry date

    hiren1312, welcome to the Forum. As a new user, please take the time to review our rules. There aren't many, and they are all important.

    If you have a follow-up question on the same solution that was given to another user you can ask that question, but your case you are asking a question about your own file. In that case we ask that you simply start a new thread with your question. Below is the formal statement of the rule.

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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] 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
  2. Change cell colour based on expiry dates
    By lb2013 in forum Excel General
    Replies: 9
    Last Post: 11-15-2013, 01:51 AM
  3. Change cell color based on date
    By khaladzki in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2011, 12:02 AM
  4. Change box color based on date
    By kritt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2009, 03:44 PM
  5. [SOLVED] Change cell color based on date
    By RRP333 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-02-2005, 02:06 AM

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