#NUM! in Date field calculation
Thanks for the help...works great!
"vezerid" wrote:
Rick, it is supposed to return #NUM!. When A1 and A2 are blank your
function essentially becomes =DAY(0, 0, 0). When you input values in
these two cells, Excel will recalculate and produce a result
automatically.
If you want to avoid displaying an error value (and display, say, an
empty cell instead), use the following formula:
=IF(OR(A1=0, A2=0), "", DATE(YEAR(A1),MONTH(A1)+(A2-1),DAY(A1))
HTH
Kostis Vezerides
|