Character constant contain one must character only

Hi , I am getting error while writing the formula in write cell
the formula is =IF(OR(K2=“Chandigarh”,K2=“Pondicherry”,AD2=“Chandigarh”,AD2=“Pondicherry”),"",R2)

1 Like

HI
welcome to uipath community
mention like this
“=IF(OR(K2=”+“Chandigarh”+",K2="+“Pondicherry”+",AD2="+“Chandigarh”+",AD2="+“Pondicherry”+"),"+String.Empty+“R2)”

Cheers @DhanashreeLokhande

It seems to be a copy-paste error. Please replace all you double quotes and write them afresh. This might fix the problem. It worked for me with the formula below.

=IF(OR(K2=“Chandigarh”,K2=“Pondicherry”,AD2=“Chandigarh”,AD2=“Pondicherry”),"",R2)

it does not work for me…it gives #NAME value in excell afterb running the robot

give the same error i.e character constant must contain exactly one character

Fine
image

Cheers @DhanashreeLokhande

@DhanashreeLokhande…here is the solution for this.

“=IF(OR(K2=”“Chandigarh”",K2="“Pondicherry”",AD2="“Chandigarh”",AD2="“Pondicherry”"),"",R2)". It does not give the mentioned error anymore. Sample

Please update if this works for you as well. Cheers!!