# Write formula in excel

**URL:** <https://forum.uipath.com/t/write-formula-in-excel/83025>\
**Category:** Help\
**Tags:** excel, activities\
**Created:** [December 18, 2018, 1:01pm UTC](https://forum.uipath.com/t/write-formula-in-excel/83025 "2018-12-18T13:01:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkriznjak](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mkriznjak/32/54484_2.png) [@mkriznjak](https://forum.uipath.com/u/mkriznjak)\
**Post date:** [December 18, 2018, 1:01pm UTC](https://forum.uipath.com/t/write-formula-in-excel/83025/1 "2018-12-18T13:01:00Z")

</div>

HI all,

I have a problem with write cell activity. I want to put formula in one cell :

“=IF(AND(A2 =H2; C2=J2);”“”“OK”“”“;”“”“NOT”“”“)” in excel, but UiPath send me error “The range does not exists”

 ![Capture](https://global.discourse-cdn.com/uipath/original/3X/6/a/6a9a9c611864ea82455946ef68ab6c952e2e5c31.png)

Can someone help me, please!

Thanks  
Matej

---

<div class="post-metadata">

**Author:** ![mgosal](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mgosal/32/176617_2.png) [@mgosal](https://forum.uipath.com/u/mgosal)\
**Post date:** [December 18, 2018, 2:12pm UTC](https://forum.uipath.com/t/write-formula-in-excel/83025/2 "2018-12-18T14:12:38Z")

</div>

I think there is a problem in your formula.

![image](https://global.discourse-cdn.com/uipath/original/3X/c/5/c5eb994d6d673895ddf235148f693ba3da8b9f63.png)

Using write cell you can set the value to a valid formula.

---

<div class="post-metadata">

**Author:** ![mkriznjak](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mkriznjak/32/54484_2.png) [@mkriznjak](https://forum.uipath.com/u/mkriznjak)\
**Post date:** [December 18, 2018, 3:46pm UTC](https://forum.uipath.com/t/write-formula-in-excel/83025/3 "2018-12-18T15:46:43Z")

</div>

Hi,

Probably you copied my formula, but this is formula for UiPath, I modified it because of usage of quotation marks. But exact formula is:  
=IF(AND(A2 =H2;C2=J2);“OK”;“NOT”)

Thanks  
Matej

---

<div class="post-metadata">

**Author:** ![mkriznjak](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/mkriznjak/32/54484_2.png) [@mkriznjak](https://forum.uipath.com/u/mkriznjak)\
**Post date:** [December 19, 2018, 11:23pm UTC](https://forum.uipath.com/t/write-formula-in-excel/83025/4 "2018-12-19T23:23:48Z")

</div>

I did it. I create separate excel file where I store excel formula. I add activity Read Cell formula and paste it to main excel.  
Also, when you Read Cell Formula, you will get formula without “=” sign, so you need to add = sign before you paste it to excel.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [December 22, 2018, 11:23pm UTC](https://forum.uipath.com/t/write-formula-in-excel/83025/5 "2018-12-22T23:23:54Z")

</div>

Closed on December 22, 2018, 11:23pm UTC

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