Reputation: 1201
I have this formula for a cell:
=ImportData("http://ichart.yahoo.com/table.csv?s=AAPL&a="&N19&"&b=7&c=2013&d=0&e=7&f=2013&g=d&ignore=.csv")
This part in the URL:
"&N19&"
...gets the cell value of N19, which is a date. I would like to do this instead:
=MONTH(N19)-1
IE: Get the month of cell N19 and then subtract one from it.
Is this possible to do inside of the URL or would I have to temporarily store the month in another cell first? I tried to call the function inside the URL but cant figure out the right way to do it. Perhaps its the same in Excel if anyone knows the answer for that..
Upvotes: 0
Views: 423
Reputation: 1138
You can absolutely include a formula within there. Get rid of your "=" sign and you've got it:
=ImportData("http://ichart.yahoo.com/table.csv?s=AAPL&a="&(MONTH(N19)-1)&"&b=7&c=2013&d=1&e=7&f=2013&g=d&ignore=.csv")
Upvotes: 2