Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

Print First Modified TimeStamp of edited Cell in a Column range

$
0
0

This code by @Ruben prints out the timestamp for the first modification for A1 into B1. How to do the same but for the whole column so A2:A printing results into B2:B?

// Global variables
var origin = 'A1';
var destination = 'B1';

function onEdit(e){

  if(e.range.getA1Notation() == origin && 
     e.range.getSheet().getRange(destination).isBlank()){
    e.range.getSheet().getRange(destination).setValue(new Date());
  }
}

Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>