View Single Post
  #4   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi


"Hans" wrote in message
...
Hi Arvi

It helped (Do you know why?)


When there is formula in cell, then the cell isn't blank. Logically your
formula tried to calculate EOMONTH("",0) which returned an error.
In my formula, when there is a formula in C38, the value returned by formula
is checked. When formula in C38 returns "", then IF returns "".
When there isn't anything in C38 - i.e. cell is empty, then in condition
check Excel iterprets it as empty string, and logically IF again returns "".
But you get an error, when C38 contains p.e. "xxxx". You can consider the
need for further checks, p.e.
=IF(OR(C38="",ISTEXT(C38),C38=38807,C38<0,C382957 978),"",EOMONTH(C38,0))
Last 2 conditions are checking for negative dates (not allowed when 1900
date system is used) and for numbers too big to be converted to dates by
EOMONTH function.


--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets