You are experiencing issues because the number of days in a month isn't the
same all the time. You could check your Tools|Add-Ins and ensure that you
don't have the Analysis ToolPak is not added in. Many times, it is added in
unknown to the user. If it is, the EDATE function I described earlier works
perfectly. If not, I have an ugly non-VBA method of ensuring that you aren't
off by a day or 2. In a way, you still will be, as obviously 18 months prior
to 8/31/2008, I am assuming you are wanting to show 2/28/2007.
First, I created 2 variables, GcolDate and IcolDate. Go to menu
Insert|Name|Define, and this is what you can copy and paste for the variables:
GcolDate
=DATE(YEAR($G2),MONTH($G2)-18,MIN(DAY($G2),CHOOSE(MONTH(DATE(YEAR($G2),MONTH($G2)-18,IF(DAY($G2)<=28,DAY($G2),1))),31,IF(YEAR(DATE(YEAR($G2),MONTH($G2)-18,DAY($G2)))=2000,29,28),31,30,31,30,31,31,30,31,30,31)))
IcolDate
=DATE(YEAR($I2),MONTH($I2)-18,MIN(DAY($I2),CHOOSE(MONTH(DATE(YEAR($I2),MONTH($I2)-18,IF(DAY($I2)<=28,DAY($I2),1))),31,IF(YEAR(DATE(YEAR($I2),MONTH($I2)-18,DAY($I2)))=2000,29,28),31,30,31,30,31,31,30,31,30,31)))
It will not work for leap years 2400, 2800, 3200, etc, but I think it'll be
alright for your purposes.
After creating those 2 formulas, your new formula would look as follows:
=MIN(GcolDate,H1,IcolDate)
Note: the 2 variables already reduce by the 18months, so no other
subtraction in your formula is necessary.
Hope this helps.