# Write Range: Range does not exist (When using a "=" for adding a formula)

**URL:** <https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966>\
**Category:** Help\
**Tags:** question, excel, activities\
**Created:** [January 10, 2020, 11:11am UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966 "2020-01-10T11:11:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![NotaRobot](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/notarobot/32/266982_2.png) [@NotaRobot](https://forum.uipath.com/u/NotaRobot)\
**Post date:** [January 10, 2020, 11:11am UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/1 "2020-01-10T11:11:23Z")

</div>

Good day,

I want to write a dt while using a Write Range for adding a dt with formulas to a sheet.  
When using the Workbook Write Range I will get just the plane text. (Like below)  
 ![afbeelding](https://global.discourse-cdn.com/uipath/original/3X/e/6/e6df6c03e965da3c0d88b3dd1b0f9c2b872f2a43.png)  
When hitting enter in the cell (while having Excel open), the formula is accepted. I have read that this doesn’t work with the Write Range from Workbook.

This is why I use the Excel Application Scope. I have debugged it it to the level of knowing that I happens when I use a = in the Write Range. Meaning I can’t write a formula to the sheet. Anybody any advice? Using the 2019.11.0-beta.2 version.

Kr, Paul (NotARobot)

---

<div class="post-metadata">

**Author:** ![shibani](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@shibani](https://forum.uipath.com/u/shibani)\
**Post date:** [January 10, 2020, 11:20am UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/2 "2020-01-10T11:20:32Z")

</div>

@NotaRobot Can you send a screetshot of your write range acitvity ?

---

<div class="post-metadata">

**Author:** ![NotaRobot](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/notarobot/32/266982_2.png) [@NotaRobot](https://forum.uipath.com/u/NotaRobot)\
**Post date:** [January 10, 2020, 2:33pm UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/3 "2020-01-10T14:33:24Z")

</div>

Sure @shibani!

 ![afbeelding](https://global.discourse-cdn.com/uipath/original/3X/c/9/c990d5127ce018ae901fdfa315c7a58dbd3b0f91.png)

I have tried the same with a string which gives me the same result.  
Please also see the xaml for more details. [UiPath\_Test.xaml](https://forum.uipath.com/uploads/short-url/dKydr2bWKHHab1RBGJOIkirRde3.xaml) (29.5 KB)  
[Example dt.xlsx](https://forum.uipath.com/uploads/short-url/pzN7Fd2x1KSxIhnq9AoWNMTrEUh.xlsx) (11.6 KB)

Kind regards! 🙂

---

<div class="post-metadata">

**Author:** ![J0ska](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/j0ska/32/111328_2.png) [@J0ska](https://forum.uipath.com/u/J0ska)\
**Post date:** [January 10, 2020, 2:58pm UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/4 "2020-01-10T14:58:15Z")

</div>

Right. I faced the same issue. Solved by clearing all formats of target cell.

![image](https://global.discourse-cdn.com/uipath/original/3X/7/2/721daf48d6a67145c11be4dfdaa2ec5aa966e31c.png)

There is no UiPath activity for this. Maybe some 3rd party in GO!

Cheers

---

<div class="post-metadata">

**Author:** ![NotaRobot](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/notarobot/32/266982_2.png) [@NotaRobot](https://forum.uipath.com/u/NotaRobot)\
**Post date:** [January 10, 2020, 3:18pm UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/5 "2020-01-10T15:18:57Z")

</div>

@J0ska… unfortunately this doesn’t do the trick for my situation. Thank you for your input though! Hopefully it will help others that face the same situation.

---

<div class="post-metadata">

**Author:** ![J0ska](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/j0ska/32/111328_2.png) [@J0ska](https://forum.uipath.com/u/J0ska)\
**Post date:** [January 10, 2020, 5:01pm UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/6 "2020-01-10T17:01:53Z")

</div>

Try the following  
[UiPath\_Test.xaml](https://forum.uipath.com/uploads/short-url/xFbR9E7NkhqPcke4WD0RfWH6TeV.xaml) (42.3 KB)

I replaced your formulas with simple =x+x  
With yours I did not make it working ☹

Cheers

EDIT: The problem is in your formulas - use “,” as separator, not “;”

---

<div class="post-metadata">

**Author:** ![NotaRobot](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/notarobot/32/266982_2.png) [@NotaRobot](https://forum.uipath.com/u/NotaRobot)\
**Post date:** [January 11, 2020, 4:33pm UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/7 "2020-01-11T16:33:34Z")

</div>

Hey @J0ska,

Thank you so much for your input! I am still trying to figure out the rest since it only gives me #Name? although the formula is correct (changes ; into , and added a quote in the formula). Also I changed the Quote variable into “”“” which is a bit easier I think. Do you mind helping me on the rest as well?

**Problem 1**  
The first column is correct. However, the second shows =Name? although the syntax is correct.

Column 1 = “=(Input!C” + cstr(Counter) + “-Input!C” + cstr(UpCounter) + “)/Input!C” + cstr(UpCounter)  
_Resulting in_ IF(A2\>=0;“Up”;“Down”) _Works_

Column2 = “=ALS(A”+ cstr(Counter)+ “\>=0,” + “”“” + “Up” + “”“” + “,” + “”“” + “Down” + “”“” +“)”  
_Resulting in_ = Name?  
When opening the cell and pressing Enter, the formula works without any changes.  
 ![afbeelding](https://global.discourse-cdn.com/uipath/original/3X/5/3/53e2a88ed7f95ee29dcfe7cd769231efee89f961.png)

**Problem 2**  
It will give me the same error "Range does not exist) when trying to write all four columns.

Column 3 = “=ALS(B” + cstr(Counter) + “=” + “”“” + “Up” + “”“” + “,A” + cstr(Counter)+“,” + “”“” + “)”  
Column 4 = “=ALS(B” + cstr(Counter) + “=” + “”“” + “Down” + “”“” + “,A” + cstr(Counter) +“,” + “”“” + “)”

---

<div class="post-metadata">

**Author:** ![NotaRobot](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/notarobot/32/266982_2.png) [@NotaRobot](https://forum.uipath.com/u/NotaRobot)\
**Post date:** [January 11, 2020, 4:45pm UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/8 "2020-01-11T16:45:06Z")

</div>

Problem 2 is solved. Missed the quote (+ “”“”) at the end.

“=ALS(B” + cstr(Counter) + “=” + “”“” + “Down” + “”“” + “,A” + cstr(Counter) +“,” + “”“” + “”“” + “)”

Problem 1 is now applicable to column 2, 3 and 4.

---

<div class="post-metadata">

**Author:** ![NotaRobot](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/notarobot/32/266982_2.png) [@NotaRobot](https://forum.uipath.com/u/NotaRobot)\
**Post date:** [January 11, 2020, 4:55pm UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/9 "2020-01-11T16:55:40Z")

</div>

[UiPath\_Test.xaml](https://forum.uipath.com/uploads/short-url/HntjD4RT2wmDtbQmgGcQvbOQRg.xaml) (43.2 KB)

---

<div class="post-metadata">

**Author:** ![J0ska](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/j0ska/32/111328_2.png) [@J0ska](https://forum.uipath.com/u/J0ska)\
**Post date:** [January 13, 2020, 10:35am UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/10 "2020-01-13T10:35:56Z")

</div>

I tested the WF you attached and it works fine for me.  
I only changed “ALS” by “IF” due to English excel.  
No idea why it doesn’t work for you ☹

Cheers

---

<div class="post-metadata">

**Author:** ![NotaRobot](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/notarobot/32/266982_2.png) [@NotaRobot](https://forum.uipath.com/u/NotaRobot)\
**Post date:** [January 13, 2020, 11:34am UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/11 "2020-01-13T11:34:45Z")

</div>

Me neither. I have also checked all kinds of settings without any succes. Creating the formula in UiPath instead of Excel. Thank you for your help @J0ska!

---

<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:** [January 16, 2020, 11:34am UTC](https://forum.uipath.com/t/write-range-range-does-not-exist-when-using-a-for-adding-a-formula/183966/12 "2020-01-16T11:34:50Z")

</div>

Closed on January 16, 2020, 11:34am UTC

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