• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Expiry date flag

Hi,

I am looking for a formula that will return either a Y or N, or an expiry date in column C to remind me to delete a record. The record needs to be deleted after 2 years. Also, I would like the cell to go red when the expiry period has been reached.

Can someone help.

Thanks a lot.
 

Attachments

  • 2 year date flag.xlsx
    11.1 KB · Views: 6
Hi,

I assume the dates in column B are the starting date.
Add 2 years = EDATE([@[Enquiry Date]],24)

Y/N, or TRUE/FALSE: =EDATE([@[Enquiry Date]],24)<=TODAY()

CF to turn red: =$C11 = TRUE
 

Attachments

  • Copy of 2 year date flag.xlsx
    11.8 KB · Views: 5
Hi Guido
I made some trivial changes to your solution which you may like or hate?
The first is to convert TRUE/FALSE to 1/0 using the SIGN() function.
= SIGN(EDATE([@[Enquiry Date]],24)<=TODAY())
This allows the number format
"Yes";;"No"
to present the result in any way the user requires without losing the underlying significance of the data.
Finally, treat the content of $C11 etc. as a Boolean in its own right, which does not require testing against TRUE or 1.

As I see it, the main argument against the strategy is the extent to which it creates effects by 'smoke and mirrors'.
 

Attachments

  • 2 year date flag.xlsx
    11.9 KB · Views: 10
Hi Guido
I made some trivial changes to your solution which you may like or hate?
The first is to convert TRUE/FALSE to 1/0 using the SIGN() function.

Finally, treat the content of $C11 etc. as a Boolean in its own right, which does not require testing against TRUE or 1.

As I see it, the main argument against the strategy is the extent to which it creates effects by 'smoke and mirrors'.
I like it because I learn a new usage of SIGN.
Clever about CF, though I like it more explicit.
I wanted to show the jobs gets done without hassle. Y/N = 1/0 = TRUE/FALSE. I prefer 1/0 as you can sum them. Smoke and mirrors are quite easily broken by users who actually do not know what's under the hood.
 
Hi Guido
I made some trivial changes to your solution which you may like or hate?
The first is to convert TRUE/FALSE to 1/0 using the SIGN() function.
= SIGN(EDATE([@[Enquiry Date]],24)<=TODAY())
This allows the number format
"Yes";;"No"
to present the result in any way the user requires without losing the underlying significance of the data.
Finally, treat the content of $C11 etc. as a Boolean in its own right, which does not require testing against TRUE or 1.

As I see it, the main argument against the strategy is the extent to which it creates effects by 'smoke and mirrors'.
Thank you - that's brilliant and just what i was after.
 
Back
Top