Assigning Excel Query Formula in variable

Hello guys. I am trying to edit the query formula in Excel and therefore I am trying to store my query formula in a variable and use a type into activity to input the formula. However, I don’t know how to type in the formula as it has quotation marks which confuse the system. May I know how I can solve the issue?

The issue somehow looks like this.

@Komom,

Just replace " with “” in your formula you are storing in config excel file.

For example if you have this formula

=IF(A1="Hello",TRUE,FALSE)

Keep it like below in you excel file

"=IF(A1=""Hello"",TRUE,FALSE)"

Or you can build your string using concatenation to avoid direct use of quotes.

variableFormula = "=IF(A1=" + Chr(34) + "Hello" + Chr(34) + ",TRUE,FALSE)"

In this, Chr(34) represents the double quote character, effectively avoiding direct quotations in the string.

1 Like

Wherever you need double quotes - use “” instead of "

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