Google-sheets – record the users within a Google sheet

google sheetsgoogle-apps-scriptgoogle-sheets-timestamp

I'd like to have an auto-generated list of users with timestamps within a spreadsheet, tabs, or if possible specific cells.

Ideally, once a cell has been altered, I'd like another cell to record the information of which user and the timestamp. Then when that same cell is altered, a new name and timestamp is recorded without deleting the old name and timestamp. I'd like to be able to set it up for multiple cells within a spreadsheet.

I've seen the onEdit and onOpen triggers but the data recorded is replaced with the newest information without a log of the old information.

Is there a way to have a continuous timestamp record of all users within a spreadsheet and ideally that information recorded for specific cells?

Best Answer

It's very likely that you are using something like

range.setValue(timestamp)

Instead use something like

range.setValue(range.getValue() +'\n' + timestamp);