# Write Cell using dynamic variable

**URL:** <https://forum.uipath.com/t/write-cell-using-dynamic-variable/157706>\
**Category:** Help\
**Tags:** excel, activities\
**Created:** [October 9, 2019, 10:23am UTC](https://forum.uipath.com/t/write-cell-using-dynamic-variable/157706 "2019-10-09T10:23:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rita\_Balmukund\_Jaisw](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rita_balmukund_jaisw/32/91465_2.png) [@Rita\_Balmukund\_Jaisw](https://forum.uipath.com/u/Rita_Balmukund_Jaisw)\
**Post date:** [October 9, 2019, 10:23am UTC](https://forum.uipath.com/t/write-cell-using-dynamic-variable/157706/1 "2019-10-09T10:23:49Z")

</div>

Hello Friends,

I am building a bot which asks user input for month and year. How can I use this input to write in excel cell which has fixed row index and column ID- month-year? So, I want to know if there is any way to use input variable to locate cell in excel?

---

<div class="post-metadata">

**Author:** ![pllo2ptk](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/pllo2ptk/32/16815_2.png) [@pllo2ptk](https://forum.uipath.com/u/pllo2ptk)\
**Post date:** [October 9, 2019, 10:26am UTC](https://forum.uipath.com/t/write-cell-using-dynamic-variable/157706/2 "2019-10-09T10:26:05Z")

</div>

create variable as string and assign user input to that.  
You have something like find value in Excel activities → try mix it (LookupRange)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [October 9, 2019, 10:30am UTC](https://forum.uipath.com/t/write-cell-using-dynamic-variable/157706/3 "2019-10-09T10:30:27Z")

</div>

@Rita_Balmukund_Jaisw

Store the values in a data table then it will be easy to write under particular column 🙂

Just use add data row activity and pass the column name which is the user input , then the value you want to add. After that simply write it back to excel which will have the values

---

<div class="post-metadata">

**Author:** ![Rita\_Balmukund\_Jaisw](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rita_balmukund_jaisw/32/91465_2.png) [@Rita\_Balmukund\_Jaisw](https://forum.uipath.com/u/Rita_Balmukund_Jaisw)\
**Post date:** [October 10, 2019, 3:21am UTC](https://forum.uipath.com/t/write-cell-using-dynamic-variable/157706/4 "2019-10-10T03:21:09Z")

</div>

[Test.xlsx](https://forum.uipath.com/uploads/short-url/6bhnRv9FzG4Pl7Qfuser3x1qAff.xlsx) (9.5 KB) [Sequence312.xaml](https://forum.uipath.com/uploads/short-url/upr8di028RPV6Prk4BPGgi7GS5K.xaml) (8.3 KB)  
[Test2.xlsx](https://forum.uipath.com/uploads/short-url/jXPjazPF03VWts78oFFf1LMLW6k.xlsx) (8.5 KB)

I am not sure how to use add row activity for writing in a cell. I searched for it on internet but still confused.  
I have attached here a workflow. User provide month and year in asked format, now I need to select that particular column based on these inputs in Test excel to write some formula say vlookup from Test 2 excel. This is some small step in big workflow I am stuck upon.  
Can you please help me around this ask?
