Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
hi,
I have write a function to track when spreadsheet cell have edited. To achieve this I written below script and it's working fine. But when I/Team copy paste multiple value then it is not working for all cell only current selected cell reference value(timestamp) updating. Can you help me what things need to be change to execute function on for more that one selected cells copy/paste value. Current running code for first scenario is : function onEdit() { var s = SpreadsheetApp.getActiveSheet(); if( s.getName() == "TrackTimeStamp" ) { //checks that we're on the correct sheet var r = s.getActiveCell(); if( r.getColumn() == 2 ) { //checks the column var nextCell = r.offset(0, 1); //if( nextCell.getValue() === '' ) //is empty? var time = new Date(); time = Utilities.formatDate(time, "IST", "HH:mm:ss"); nextCell.setValue(time); }; }; } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Multiple Columns, Paste Under a Single column | Excel Worksheet Functions | |||
Search column for date format; cut and paste multiple cells to row above | Excel Programming | |||
Copy and Paste to multiple woorksheets at one time | Excel Discussion (Misc queries) | |||
Can you paste values on multiple worksheets at one time? | Excel Worksheet Functions | |||
How do I get a hyperlink to track cut and paste data? | Excel Discussion (Misc queries) |