Skip to content
Advertisement

How do I change my formula syntax to use variables

I’m trying to use set formula but it keeps saying I’m having an issue with my syntax but I’m not exactly sure how to fix it. I’m trying to use declared variables as the inputs to the formula.
The bold line below is where I’m having the problem.

JavaScript

Advertisement

Answer

Use the concatenate operator + and the single and double quotes or template literals (template strings) properly.

Let say that you decided to use simple quotes. Since your formula requires the use of double quotes per Google Sheets formula syntax, you might use single quotes on each string literal. To do this, replace

JavaScript

by

JavaScript

By the other hand if you decide to use template literals, the replace the referred code line by

JavaScript

Related

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement