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

Adding Multiple timestamps, One with Checkbox

$
0
0

I am looking to add a second timestamp, connected to a checkbox. I currently have it set to put a timestamp in Column D when B is filled in. I would also like a timestamp in Column O when Column A checkbox is checked.

Here is my sheet: https://docs.google.com/spreadsheets/d/1h40jXZ-V0fe8oLDSQ2NmbTDW5dk3WKgZJvZ7ROcwChY/edit?usp=sharing

Progress update:

I have figured out the 2 scripts that work separately but am struggling on how to combine them so they work simultaneously.

Script 1:

function onEdit() {var s = SpreadsheetApp.getActiveSheet();if( s.getName() == "Work Order Queue" ) { var r = s.getActiveCell();if( r.getColumn() == 2 ) { var nextCell = r.offset(0, 2);if( nextCell.getValue() === '' ) nextCell.setValue(new Date());}}}

Script 2

function onEdit() {var s = SpreadsheetApp.getActiveSheet();if( s.getName() == "Work Order Queue" ) { //checks that we're on the correct sheetvar r = s.getActiveCell();if( r.getColumn() == 1 ) { //checks the columnvar nextCell = r.offset(0, 14);if( nextCell.getValue() === '' ) //is empty?nextCell.setValue(new Date());}}}

Viewing all articles
Browse latest Browse all 9782

Trending Articles



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