calc fails to enter formula by macro

Posted on

Below case when the formula is put to the cell by macro, it can not calculate the value:
Sheet.getcellByPosition(10,10+j).Formula="=IF(I"+Cstr(j+11)+"<>"+Chr$(34)+Chr$(34)+",IF(VALUE(I"+Cstr(j+11)+")=VALUE(RIGHT(A$11,1)),0,1),0)"

sheet
If however I put same formulate to the cell without using macro, it seems to work.

Responses