mKeey
mKeey

Reputation: 135

Google Sheets onEdit no triggering with copy & paste

i've the following script it is working perfect when I enter on my own numbers.

function onEdit(e) {
  
  var row = e.range.getRow();
  var col = e.range.getColumn();
  
  if(col === 4 && row > 1 && e.source.getActiveSheet().getName() ===  "Inventur"  ){
  e.source.getActiveSheet().getRange(1,8).setValue(new Date());
    
  }
}

Now when I copy & paste a text in there, the timestamp will not change. My question is, how I can get this one working also with copy & paste?

Thanks for any help

Upvotes: 0

Views: 165

Answers (1)

Cooper
Cooper

Reputation: 64140

I will update the timestamp as long as e.range.columnStart==4 and e.range.rowStart>1.

If you want it to do something different then you will have to change it. What is it that you wish it to do?

Animation:

enter image description here

Upvotes: 3

Related Questions