我需要找到一种方法,将以下GoogleFinance公式的输出自动复制到另一个单元格中,并使其保持不变,即汇率变化时不变。
=A1*GOOGLEFINANCE("currency:AUDGBP")
我打算使用类似=value(x)
的东西,但是每次上述公式生成新值时,这种情况都会改变,而我希望在输出答案后立即粘贴。
答案 0 :(得分:1)
The GOOGLEFINANCE function has some optional parameters - one of them is the start date.
If you request the exchange rate for a particular date then it won't change later on.
=GOOGLEFINANCE("Currency:AUDGBP", "price", "05/31/2019")
The output is a little different - a range with the date and value rather than a single cell, but the value for the exchange rate is correct and won't change.
You can then use the INDEX function to extract just the exchange rate
=INDEX(GOOGLEFINANCE("Currency:AUDGBP", "price", "05/31/2019"), 2, 2)
As described here
答案 1 :(得分:0)
有很多选项,包括:
答案 2 :(得分:0)
如果您想玩按钮和脚本,那么:
function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet();
var source = ss.getRange('Sheet1!A1');
source.copyTo(ss.getRange('Sheet2!A1'), {contentsOnly: true}); }
这会将值从 Sheet1!A1 复制到 Sheet2!A1
否则 CTRL
+ C
和 CTRL
+
SHIFT
+ V
用于手动复制