Having problem to write formula in write cell activity

Hello guys,

I am trying to write this formula:

=IF(OR(ISBLANK($C2),OR(AND($I2=“COMP”,$N2=“”,$Y2=“”),AND($I2=“COMP”,NOT(ISBLANK($N2)),NOT(ISBLANK($Y2))))),“”, TODAY()-$C2)

But UiPath is giving me , compiler error encountered processing expression.

Can somone help me on this matter?

Hi,

What activity do you use? Basically it will be as the following.

"=IF(OR(ISBLANK($C2),OR(AND($I2=""COMP"",$N2="""",$Y2=""""),AND($I2=""COMP"",NOT(ISBLANK($N2)),NOT(ISBLANK($Y2))))),"""", TODAY()-$C2)"

Regards,

i am not using the modern one. i am using the conventional write cell activity.

Do you think i need to use modern write cell activity in order to make this formula works?

Hi,

No, it also work in classic write cell as the following.

image

Please check your expression string (or copy and paste the above expression)

Regards,

Thanks @Yoichi … It works. But, can you explain a bit for my learning purpose…

From my observation, you change my excel formula a bit…

Can you explain the reason behind of the change?

Hi,

In VisualBasic, we need express " as ""because double quote is special character.
For example, "COMP" should be ""COMP"" , "" should be """".

Hope this helps you.

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.