+ Reply to Thread
Results 1 to 10 of 10

Help with IF THEN type of function

  1. #1
    Registered User
    Join Date
    06-19-2020
    Location
    Adelaide, Australia
    MS-Off Ver
    Ver 16 Mac
    Posts
    12

    Help with IF THEN type of function

    Would appreciate some help with the following -
    We keep an Excel spreadsheet to track our suppliers insurance documents but need some help in setting up the Expired field.

    The Column Heading is Expiry Date and in this field we capture the expiry date of the insurance certificate. I would like to automate this field by using a formula to look at the date in the field, comparing it to the current date and firstly to change the text to red 1 month before the expiry date and then to change the text in the field to "Expired" 1 day after the noted expiry date.

    Is this something that can be done?
    thank you
    Alan

  2. #2
    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,916

    Re: Help with IF THEN type of function

    Yes, but it will be easier to advise precisely with a sample workbook.

    Read the yellow banner at the top of the page.
    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.

  3. #3
    Registered User
    Join Date
    06-19-2020
    Location
    Adelaide, Australia
    MS-Off Ver
    Ver 16 Mac
    Posts
    12

    Re: Help with IF THEN type of function

    Sample of proposed register attached.
    Reflected expiry date is 20 March 2022, on 20 February 2022 would want the date 20 March 2022 to change to red text to flag the requirement to obtain renewed certificate. On 21 March 2022, would want the date to be
    be replaced with the word "Expired".
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Help with IF THEN type of function

    Quote Originally Posted by Alan R View Post
    Sample of proposed register attached.
    On 21 March 2022, would want the date to be
    be replaced with the word "Expired".
    It cannot be done in the same cell. You need to add another column to capture the text "Expired".
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Help with IF THEN type of function

    Yes... 2 possible alternatives. You could:

    a) have the date amended with a strikethrough once expired

    b) render the expired date invisible by either making the font white, or the cell fill colour black.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Help with IF THEN type of function

    I have a solution but it seems I was blocked.
    In conditional formatting for month request use the
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and choose red for font color.
    for "Expired" the formula is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and in format window, for number choose CUSTOM and type double quoted "Expired". Choose another color for fill
    Attached Files Attached Files
    Last edited by tanasedn; 07-08-2021 at 07:46 AM.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Help with IF THEN type of function

    Blocked? What do you mean by that?

  8. #8
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Help with IF THEN type of function

    Quote Originally Posted by Glenn Kennedy View Post
    Blocked? What do you mean by that?
    When I tried to post I was redirected to sucuri.net site. But now it work.

  9. #9
    Registered User
    Join Date
    06-19-2020
    Location
    Adelaide, Australia
    MS-Off Ver
    Ver 16 Mac
    Posts
    12

    Re: Help with IF THEN type of function

    Quote Originally Posted by tanasedn View Post
    I have a solution but it seems I was blocked.
    In conditional formatting for month request use the
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and choose red for font color.
    for "Expired" the formula is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and in format window, for number choose CUSTOM and type double quoted "Expired". Choose another color for fill
    Thank you for the assistance.

    I understand the Conditional Formatting. However I don't understand how column F you have inserted with a formula only in F4 relates to the Conditional Formatting.
    I am trying to understand the formatting so I can recreate for Column H. I have tried to copy the process but I am not getting the same result.

  10. #10
    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,916

    Re: Help with IF THEN type of function

    You can delete that column F - it's not needed. There are two CF rules that relate to column E.

+ 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] Max type function
    By Alan Beban in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-27-2017, 09:39 PM
  2. Need help with a matching type function
    By LCook17 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-05-2014, 03:22 PM
  3. [SOLVED] Some type of IF function...
    By Jammin91 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-11-2012, 05:39 AM
  4. [SOLVED] NVL type function
    By Jonathan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2006, 03:10 PM
  5. [SOLVED] Help with TYPE function
    By DMDave in forum Excel General
    Replies: 5
    Last Post: 05-07-2006, 01:40 PM
  6. [SOLVED] I need a productif type function
    By Mitch in forum Excel General
    Replies: 5
    Last Post: 05-04-2006, 12:40 PM
  7. Type mismatch in look up function
    By bisjom in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-09-2006, 01:16 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