View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick
 
Posts: n/a
Default #NUM! in Date field calculation

Thanks for your help...it works great, also.

"Peo Sjoblom" wrote:

One way

=IF(COUNT(A1:A2)<2,"",(DATE(YEAR(A1),MONTH(A1)+(A2-1),DAY(A1))))


--

Regards,

Peo Sjoblom

"Rick" wrote in message
...
Great site for help!
I have 3 cells.
A1 is a date cell (formatted for date mmm/yy) in which I input a start

date.
A2 is a numeric value representing the length of a project in months.
A3 contains this formula =(DATE(YEAR(A1),MONTH(A1)+(A2-1),DAY(A1)) and is
formatted as a date cell.

It works to a fashion except it returns #NUM! when there is nothing in

cell
A1 & A2.

How do I fix this or get around it?
I want the cell A3 to show nothing unless both A1 & A2 have inputs.