+ Reply to Thread
Results 1 to 3 of 3

IF Function based on a date of expiry

  1. #1
    Registered User
    Join Date
    05-09-2019
    Location
    Townsville, Australia
    MS-Off Ver
    Excel 2016
    Posts
    8

    IF Function based on a date of expiry

    Hi All. I am doing a sheet based on medications and need a cell date to change colour and say certain things based on the expiry date (Expiry date in cell next to the cell I want to change based on the expiry date).

    First rule - If date is expired as of today cell must say "Expired" and turn RED
    Second rule - If date is expiring within 2 months cell must say "Expiring Within 2 Months" and turn Orange
    Third rule - If date is expiring within 6 months cell must say " Expiring Within 6 Months" and turn Yellow
    Fourth rule - If date is expiring 6 months or more cell must say "Expiry Greater than 6 Months" and turn Green

    I have tried with conditional formatting and failed dismally. Any help would be appreciated.

    Thanks
    Dave

  2. #2
    Registered User
    Join Date
    05-09-2019
    Location
    Townsville, Australia
    MS-Off Ver
    Excel 2016
    Posts
    8

    Re: IF Function based on a date of expiry

    Update: I am using the latest version of Excel

  3. #3
    Registered User
    Join Date
    05-25-2018
    Location
    Sydney
    MS-Off Ver
    2013
    Posts
    14

    Re: IF Function based on a date of expiry

    Hi,

    I think that you need to do it two steps.

    One is to work out the status of Expiry using a formula and then to use the result of the formula to conditionally format it.

    The following formula will work the status of Expiry assuming the expiry date in A1 cell:

    IF(A1=TODAY(),"Expired",IF(DATEDIF(A1,TODAY(),"d")<60,"Expiring Within 2 Months",IF(DATEDIF(A1,TODAY(),"d")<180,"Expiring Within 6 Months","Expiry Greater than 6 Months")))

    As it seems that you are familiar with conditional formatting, I leave it to you. Also, you can include the above formula in conditional formatting (Use a formula to determine which cells to format option)

    Kind regards

    Saba

+ 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. Calcuate Expiry Date based on multiple cirteria #2
    By sorensjp in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2019, 02:16 AM
  2. I need expiry date function expired expire soon highlited
    By tariqjahangir in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2019, 03:32 AM
  3. [SOLVED] Count days before expiry date & after Expiry date in one formula
    By Macfool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-16-2017, 02:58 PM
  4. Filtering based on expiry date and other criteria
    By nickyboy1981 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-10-2016, 02:21 PM
  5. using countif function to track courses and expiry date
    By tangle88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-20-2015, 08:58 PM
  6. autocalculate expiry date / expiry date colour warnings
    By kimbling1 in forum Excel General
    Replies: 8
    Last Post: 08-27-2014, 02:53 AM
  7. Replies: 0
    Last Post: 06-28-2014, 09:31 AM

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