Apr 20 2021 01:11 AM
Hi Everyone,
The Question;
I am looking for help in constructing an IF statement or another formula to auto-generate Expiry dates based on variable rules.
A Little 'O Context;
This information is used as part of a small database that permits marine traffic through a controlled area. The data is mostly input by myself, however, there are some other users in my organisation and a number of people who read the output information.
The data needs to be precise as it is used by decisions makers in my organisation and is sometimes made available to outside parties. Further, this will reduce the human element in the calculation, therefore, reducing the potential for error and promotes better reporting down the line.
The Data;
The key time frames of the age of paint are
Guys, I tried and I Googled;
I started this task a few days ago. I have started, come close but not quite right and sometimes completely failed. I have gone to google and found solutions that look close but do not work. I have focused on IF statements and expressions, however, have tried some other formulae that may work with no luck.
Extra Info;
I have attached an example spreadsheet as the other information on the original is commercially sensitive. In columns J to L, I have included what the dates should be based on the rules as set above.
Many thanks for your help;
I would appreciate any help. I am continuing to work on this and if I find the solution I will post for the completion and future 'Googlers'.
Apr 20 2021 08:25 AM
Apr 20 2021 02:17 PM
Thanks @mathetes that is a good point, it is clear in my mind. I'll do my best to describe this in words.
Column A is a starting point so to speak. I am given a form with a date on it, that is when the date of inspection and when the valid period begins.
On that same form is a date which is put into Column C. This is the date that sets the conditions for how long the inspection will be valid for.
Column D is the current age of the antifoul based on the date difference between TODAY() and Column C. This is the main parameter that sets the conditions for the inspection expiry. If the Date Dif between TODAY and Column C is;
Column F is calc'd using the date supplied for Col' C and Col' E. In some cases this will be what sets the upper limit of the inspection.
The info I supplied in Column L, with Col' J being the desired output, is the months the reason why the expiry date is what it is.
Apr 20 2021 03:06 PM
Apr 20 2021 03:52 PM
SolutionDoes this do it?
I have converted to a table to keep the data and formulas in sync.
= MIN(
EDATE([@[Inspection Date]], IF(today-[@[AntiFoul Application Date]] < 182, 6, 3)),
[@[Antifoul Expiry]] )
Apr 20 2021 03:52 PM
SolutionDoes this do it?
I have converted to a table to keep the data and formulas in sync.
= MIN(
EDATE([@[Inspection Date]], IF(today-[@[AntiFoul Application Date]] < 182, 6, 3)),
[@[Antifoul Expiry]] )