1

I have a list of scrips of stock market. When I add a new scrip in a new row, I would like to automatically fill its current price using GoogleFinance function of google sheets.

In the attached google sheets, Column A contains the mnemonics of the scrip from which column B calculates the current price. When I add a new scrip, I copy the formula to the new row. How do I achieve it automatically?

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124
  • Does this answer your question? [Google finance as an argument for ArrayFormula](https://stackoverflow.com/questions/60874426/google-finance-as-an-argument-for-arrayformula) – vilc Sep 20 '22 at 06:31

1 Answers1

1

GOOGLEFINANCE is already a type of ARRAYFORMULA so it is not supported under ARRAYFORMULA. this means that it is not possible to process your A column with one single formula. you have only two options how to do this:

  • use script which will detect new entry in A column and insert single-cell GOOGLEFINANCE formula adjacent to it
  • hardcode it like:

=IFERROR({GOOGLEFINANCE("NSE:"&A2);
          GOOGLEFINANCE("NSE:"&A3);
          GOOGLEFINANCE("NSE:"&A4);
          GOOGLEFINANCE("NSE:"&A5);
          GOOGLEFINANCE("NSE:"&A6);
          GOOGLEFINANCE("NSE:"&A7);
          GOOGLEFINANCE("NSE:"&A8);
          GOOGLEFINANCE("NSE:"&A9)})
player0
  • 124,011
  • 12
  • 67
  • 124