Write cell using formula showing "Range does not exist exception"

I want to calculate difference between two columns (B2 - A2) and store it in C2 . I tried to give the formula as “”=IF(ISBLANK(B2),"",B2-A2)" , as i want to calculate the difference only when the column " B2" has value ,but it is showing “the range doesnot exist error”.

But it worked when i gave the formula as " B2 - A2" alone.

Hy @Adharsh22 ,

It looks like there is an issue with your formula, the error message is not helping at all :frowning:

As you are working in UiPath could you try running the calculation in UiPath, via if statement, and then just print the result in Excel?

Please like my post and mark my answer as solution, it helps me :slight_smile:
Any questions please let me know

Regards

Hi @William_Blech_Sister,

Thanks for the reply. I have almost 1000 rows to calculate, I want to use “Auto-fill range” activity to calculate the difference for the rest of the rows. The problem with formula “=B2 - A2” is that it calculates the difference even if any of the value is empty and this creates negative values for many rows , i want to avoid that .

Regards,

Hy @Adharsh22,

Your spreedsheet will work faster if you do the calculation in UiPath, as Excel formulas keep recalculating all the time.
Try it out and you will see it is not as slow and you think it will be :slight_smile:

Please let me know if it works

Regards