MrExcel Consulting
Your One Stop for Excel Tips & Solutions

calculate due date and give a warning message


Posted by HY on January 15, 2002 6:00 AM

HELP
how can i:
- calculate yearly expiration date = (A)
- substract (A) from TODAY to get how many days left and options to get '+' and '-'
- get a warning message saying we are "OK" or "WARNING - TIME TO RENEW"
thanks

Posted by Dan on January 15, 2002 9:30 AM

Couple of things...When you say you want to calculate yearly expiration date, how do you want to calculate it? From what date? See if this helps.

Lets say you have a beginning date in cell A1. In cell B1, you can calculate the expiration date as 1 year from beginning date by formatting the cell as a date and using the formula:
=EDATE(A1,12)

In cell C1, you can calculate days left by formatting the date as a number with 0 decimal places and using the formula:
=B1-Now()

In cell D1, you can get a warning message by using the formula:
=IF(C1>=0,"OK","Warning - Time to Renew")

Hope that helps you get started.