 # If condition on EXCEL by using UIPAATH

Hi everyone,

I m trying to make UiPath run an if Function in the Field E3 in Red Frame).
The If fuction to run is :
IF(E2>=365,“25”,IF(E2>=150,“15”,IF(E2>=53,E2*10%,IF(E2>=13,“5”,IF(E2>=5,“2”,“1”)))))
sample|690x72

As you can see, the function is completely relying on E2, however, E2 is not a fixe number.
It’s an extrapolation of E1, which is the population number, that may change depending on the userlist received.

I could make UiPath calculate E1, and E2. However, when I type the IF function to run in E3, I receive the following error message Would you please show me how to make it work ?

Thank you

Hi,
assign the if condition that you are trying to write in write cell to a variable and then pass the variable for else also do the same and let us know if this works,
Regards,
Pavan H

@Faouzi_Moueffek

Use " " and an = sign

“= IF(E2>=365,“25”,IF(E2>=150,“15”,IF(E2>=53,E2*10%,IF(E2>=13,“5”,IF(E2>=5,“2”,“1”)))))”

Thank you for your help, I still have the following error message Hi Pavan, Thank you for your reply. Unfortunately I m unable to execute the solution that you proposed, I m in the learning phase and don’t know how to do it Hi, when using the double quotes after the first one and last one use escape char I. e, use 2 double quotes instead of one.
Let us know if this helps.

Regards
Pavan H

2 Likes

To fix that, use this string:

“= IF(E2>=365,"“25”",IF(E2>=150,"“15”",IF(E2>=53,E2*10%,IF(E2>=13,"“5”",IF(E2>=5,"“2”","“1”")))))”

4 Likes

Check the attached xaml file…

IFConditionWriteCell.xaml (5.0 KB)

1 Like

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