insert formula
<the '=' sign inside the quotes is causing some problems
What problems? And what does "formula works fine" mean?
--
Kind regards,
Niek Otten
wrote in message oups.com...
i am writing a macro and would like to insert a formula in like this
Range("H10").FormulaArray =
"=IF((WEEKDAY(DATE(YEAR(H9)+$D$1,MONTH(H9)+$D$2,DA Y(H9)+$D$3),1)-1)*(WEEKDA*Y(DATE(YEAR(H9)+$D$1,MONTH(H9)+$D$2,DAY (H9)+$D$3),1)-7)=0,WORKDAY(DATE(YEAR*(H9)+$D$1,MONTH(H9)+$D$2,DA Y(H9)+$D$3),-1),DATE(YEAR(H9)+$D$1,MONTH(H9)+$D$*2,DAY(H9)+$D$3 ))"
the formula works fine.. but the '=' sign inside the quotes is causing
some problems
how do i overcome this.
basically i am trying to add one month to a date. if the result is not
a weekday, then, i shift the result to one previous weekday
thanks a lot in advance
|