Craigc3814
Board Regular
- Joined
- Mar 7, 2016
- Messages
- 217
I want to bring in some data from a website based on a stock ticker of my choosing, below is the code. Is it possible to change the eng (stock ticker) to a cell reference? For example if I type something in cell A1 and refresh query it would change that ENG to whatever is in cell A1 on a sheet called ticker?
let
Source = Web.Page(Web.Contents("http://www.marketwatch.com/investing/stock/eng/financials")),
Data0 = Source{0}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data0,{{"Fiscal year is January-December. All values USD millions.", type text}, {"2011", type text}, {"2012", type text}, {"2013", type text}, {"2014", type text}, {"2015", type text}, {"5-year trend", type text}})
in
#"Changed Type"
let
Source = Web.Page(Web.Contents("http://www.marketwatch.com/investing/stock/eng/financials")),
Data0 = Source{0}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data0,{{"Fiscal year is January-December. All values USD millions.", type text}, {"2011", type text}, {"2012", type text}, {"2013", type text}, {"2014", type text}, {"2015", type text}, {"5-year trend", type text}})
in
#"Changed Type"