I want to add a timestamp when the result of a cell, which contains INDEX
and MATCH
formulae (=INDEX('Sheet2'!$C$9:$Q$9,MATCH(I156,'Sheet2'!$C$5:$Q$5,1))
, changes. This forumula provides a numerical category/band for my different data entries (1, 2, 3 etc) depending on the number input in column I
.
I ran the script below but it only works if I edit the cell itself and not if the formula result changes based on the value of column I
changing.
I don't want to associate the script with the cells in column I
, which I directly edit, as I want to track the date that my data moves from one category to another and the data in column I
could change multiple times before it moves to the next category.
If anyone has some suggestions or links to articles that could help (I am a complete novice) - that would be great!
Thanks,
R
var row = e.range.getRow();
var col = e.range.getColumn();
if (col === 5 && e.source.getActiveSheet().getName() === "Master Test Sheet - All Stores") {
e.source.getActiveSheet().getRange(row,1).setValue(new Date());
}
}