Can i use a variables when write a formula into a cell?

About “Write Cell”, want to write a formula into “Value” like below.

“=WORKDAY(tmpAry(0).Substring(0,2) + (Integer.Parse(tmpAry(0).Substring(2)) + i).ToString,-2)”

when i using variable “tmpAry”, after running can not found the cell i want to access.

I have found a way to solve the problem.

Write formula like below will be working well.
“=WORKDAY(” + tmpAry(0).Substring(0,2) + (Integer.Parse(tmpAry(0).Substring(2)) + i).ToString +“,-2)”

Yes you can, you simply need to keep the formula part inside quotation marks " " and where you wnt your variable just add + variable+ (with formula on both sides of the variable

Thank you very much. i have tried it and running perfect !

@etss1016

great please mark the solution so in future others can refer it :slight_smile:

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