=ARRAYFORMULA(IF(ROW(B:B)=1, "Share Price", IF(ISBLANK(B:B), "", googlefinance(B:B, "price"))))
Run Code Online (Sandbox Code Playgroud)
我试图让第 1 行(我的标题行)有一个名称,然后在其下方,如果 B 列中输入了有效的股票代码,则让 google Finance 获取该股票的价格。然而,我在“股价”下方的所有单元格中都得到了“N/A”,并且不明白为什么。
请帮助。
google-finance google-sheets google-apps-script array-formulas google-sheets-formula