Google-sheets – How to make a cell autopopulate the date dependent on another cell

google sheetsgoogle-sheets-datesgoogle-sheets-timestamp

I'm trying to make a recruitment sheet for an online community I help run. What I'm currently attempting to do is that when we record a person has joined the Discord to column B, it'll automatically propagate the date joined in the corresponding space in column D.

I've never messed with date or timestamp functions in excel, so I'm not really sure where to start with this. I tried doing a bit of googling, but all that came up was 'how to create an auto-updating date.'

Here's my Test Sheet.

Best Answer

First, you can use this script to get yourself a timestamp function:

function TIMESTAMP() {

var today = new Date();
var date = (today.getMonth()+1)+'-'+today.getDate()+'-'+today.getFullYear();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = date+' '+time;
return dateTime;

}

Then, you should be able to use an if statement to call it into action. For example, "If(c3="","",TIMESTAMP())", then drag that down all the way for the column.

Let me know if that makes sense!