Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others


0 votes
in Technique[技术] by (71.8m points)

concatenation - Insert Dynamic Value in URL from a Cell in Google Sheet

I am trying to build a URL in a cell (google sheets) which will get some of its values from different cells. I have tried using all different ways I can think of like concatenate, Join, & etc but the problem is that the URL has some curly brackets and " as a requirement and that breaks the formula:

URL Example https://katang.io/?t_pid=1&t_extra={"Source":"stackoverflow","Type":"email","Stategy":"banner"}

So I need "Source":"stackoverflow" to be dynamic

so for example "Source":"Get Value from Cell A1"

Any Help or guidance will be much appreciated

Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Things to note:

  1. "" makes a literal " character in a string, so you'll have to double up every one.
  2. The & is the concatenation operator in a formula, so you can use that to get values outside of your string.

Therefore, this formula should work:


enter image description here

Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share