One way you can do this is with an extra log sheet and an Apps Script script.
Here is one that I have written and tested in a copy of your sheet:
/** @OnlyCurrentDoc */
function onEdit(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var blad1 = ss.getSheetByName('Blad1');
var editHistory = ss.getSheetByName('editHistory');
var editRange = blad1.getRange('E1:L1');
var eRange = e.range;
var eRow = eRange.getRow();
var eCol = eRange.getColumn();
if (eCol >= editRange.getColumn() && eCol <= editRange.getLastColumn() && eRow >= editRange.getRow() && eRow <= editRange.getLastRow() && !eRange.isBlank()) {
var newVal = eRange.getValue();
editHistory.appendRow([newVal]);
}
}
This script takes any value that's placed into the edit range (in your case that's E1:L1) and appends it to the extra sheet. From this, you can use a UNIQUE() formula that points to the list in this sheet in order to get a full unique history of all the entered values.
发布评论
评论(2)
您可以做到这一点的一种方法是使用额外的日志表和一个应用程序脚本。
这是我在您的工作表的副本中编写和测试的一个:
此脚本采用任何放置在编辑范围中的值(在您的情况下是
e1:l1
),并将其附加到额外的工作表中。由此,您可以使用unique()
公式,该公式指向此表中的列表,以获取所有输入值的完整唯一历史记录。One way you can do this is with an extra log sheet and an Apps Script script.
Here is one that I have written and tested in a copy of your sheet:
This script takes any value that's placed into the edit range (in your case that's
E1:L1
) and appends it to the extra sheet. From this, you can use aUNIQUE()
formula that points to the list in this sheet in order to get a full unique history of all the entered values.独特的
Unique