0

I've been searching high and low for a solution to this but I've only found lots of answers for Google Apps instead of Excel Online. Not sure if the Google Apps script can be used in Excel Online, but here goes anyway.

What I'm looking for is guidance on how to create an 'onEdit' type script for an Excel Online spreadsheet that will insert a timestamp in the row (let's say A10) where a cell in a different column/same row (let's say N10) is changed.

Any help would be HIGHLY appreciated!

  • 1
    https://learn.microsoft.com/en-us/office/dev/add-ins/excel/. Apps Script is completely different. – BigBen Feb 17 '21 at 15:43
  • 1
    if you are just using a table, you could probably use a sharepoint list and a create a flow in Power Automate that will run every time a row is edited. – Ethan Feb 19 '21 at 11:23

2 Answers2

3

While you can't use Apps Scripts in Excel, you can use Office Scripts in Excel for the Web: https://learn.microsoft.com/en-us/office/dev/scripts/

That said, there aren't any event-like structures in the feature today. You can trigger a script to run through Power Automate or a manual button push, but nothing to automatically run when a user edits a cell. Office Scripts are still in preview and we welcome your feature requests. Please head over to UserVoice and create or upvote a request for "onEdit" events.

Alexander Jerabek
  • 358
  • 1
  • 3
  • 10
0

Macro-less formula that I finally cobbled together:

  1. Turn on iterative calculations for formulas (Options -> Formulas).
  2. Add this formula in A10: =IF(CELL("row")=ROW(A10), NOW(), A10)
  3. Drag that up and down your A column as needed

Changes to any column in a row will update its timestamp.

Tim
  • 1
  • 1