jjunbbug
jjunbbug

Reputation: 135

Is there an way to reference a cell inside a url in google sheets?

I'm trying to reference a cell inside a URL and I want to know whether it's possible or not. For example, this is my Import Json url.

https://www.alphavantage.co/query?function=TIME_SERIES_WEEKLY&symbol=MSFT&apikey=demo

And in A1, I have a value called "AMD".

Is it possible to replace MSFT with AMD by just referencing A1? What I have in mind is similar to this.

https://www.alphavantage.co/query?function=TIME_SERIES_WEEKLY&symbol=A1&apikey=demo

=ImportJSON("https://www.alphavantage.co/query?function=TIME_SERIES_WEEKLY&symbol=MSFT&apikey=demo")

Google Sheets

=ImportJSON("https://www.alphavantage.co/query?function=TIME_SERIES_WEEKLY&symbol=MSFT&apikey=demo")

Upvotes: 0

Views: 793

Answers (1)

JPV
JPV

Reputation: 27262

See if this works

=IMPORTJSON("https://www.alphavantage.co/query?function=TIME_SERIES_WEEKLY&symbol="&A1&"&apikey=demo")

Example

Upvotes: 1

Related Questions