3
=GOOGLEFINANCE("NSE:"&A2, "all",(TODAY()-($N$2)),TODAY(),"DAILY")

The above code returns OHLC data for specified days with the date column.

What I want are only high, low and close columns.

=GOOGLEFINANCE("NSE:"&A2, ("high", "low", "close"),(TODAY()-($N$2)),TODAY(),"DAILY")

This code doesn't work.

And if use:

=GOOGLEFINANCE("NSE:"&A2, "high",(TODAY()-($N$2)),TODAY(),"DAILY")

it returns high but with an added column named date.

So if I do this for all 3 (high, low, close) individually in different columns, I will get 6 columns instead of 3 (3 date columns are unnecessary for me).

I need just the high, low and close without the date column or at the most just 1 date column.

1 Answer 1

3

=ARRAY_CONSTRAIN(GOOGLEFINANCE("NSE:"&A2, "all", TODAY()-($N$2), TODAY(), "DAILY"), 2, 4)

0

=QUERY(GOOGLEFINANCE("NSE:"&A2, "all", TODAY()-($N$2), TODAY(), "DAILY"), 
 "select Col2,Col3,Col4", -1)

0

1
  • 1
    Thanks, your method using QUERY is very useful. :)
    – maxhugen
    Jun 18, 2021 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.