Hi Mark!
Your formula works OK for me if I3497 is an empty cell.
I get #VALUE! with a space in the cell or other (more obvious) text. I
also get #VALUE! if I3497 contains a formula.
But what is your formula doing?
If adding a year use:
=IF(J3497=102,IF(I3497>0,DATE(YEAR(I3497)+1,MONTH(I3497),DAY(I3497)),"
"),"")
If finding the day before the expiry of a year:
=IF(J3497=102,IF(I3497>0,DATE(YEAR(I3497)+1,MONTH(I3497),DAY(I3497)-1)
,""),"")
By just adding 365 you are exposing yourself to different results for
Leap Years.
But I prefer the standard approach:
=IF(COUNTA(I3497:J3497)<2,"",IF(J3497=102,DATE(YEAR(I3497)+1,MONTH(I34
97),DAY(I3497)-1)))
Or perhaps covering either having a blank cell or formula returning ""
=IF(OR(I3497="",J3497=""),"",IF(J3497=102,DATE(YEAR(I3497)+1,MONTH(I34
97),DAY(I3497)-1),""))
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.