On my Google sheet I created an Apps Script to time stamp the sheet at B1 any time that it is edited:
```
/** @OnlyCurrentDoc */
function onEdit(e){
const sh = e.source.getActiveSheet();
sh.getRange ('B1')
.setValue (new Date())
.setNumberFormat ('yyyy-MMM-dd HH:MM');
}
```
I would like to use this Apps Script for other Google Sheets of mine without having to copy and paste the code to each sheet.
I have looked at
How can I share my app script, between google spreadsheets? and
How to share or distribute google apps script with other users? and
https://www.youtube.com/watch?v=voft0qZfkvw
but have not succeeded after a couple of hours of trying.
Please help if you can. Thanks.