6

I want to time stamp when a cell was filled out in the column to the right of only certain columns. We use a simple spread sheet to keep inventory and I'd like to know when someone takes something or checks it back in for accountability reasons. I found a script that adds a note, but that gets very annoying when I only want it to apply in certain areas. So when someone updates columns C,D,I, or J with their initials, I'd like a time-stamp to show up in column E or K. Is this possible with a script? I've attached an image for an idea with the red squares showing where I'd like the time/date showing.enter image description here

0

1 Answer 1

7

All you need is this short script

function getDate() {
  return new Date();
}

And then you can put this equation into E1: =getDate(C1:D1) which you can then drag down. You may also want to change the format for column E and select a date format where both date and time are displayed.

1
  • 1
    When some cell in the Spreadsheet is changed e.g. C1, then all cells that use C1 in an equation are updated automatically. So if you put =getDate(C1:D1) into E1, E1 will get updated whenever C1 or D1 are changed. Otherwise it keeps it's current value.
    – Tesseract
    Nov 14, 2017 at 2:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.