2

I have a cell A1, whose values I change periodically.

I have a cell F7:F, I add values to this column from time to time.

I have another cell K7:K whose values depend on what's in A1 and what's in F7:F.

K7=(F7)/(A1*15) --just an example using row 7, K7 would only be filled once there's a value in F7.

However, I only want K7:K's values to change the first time, depending on what's in A1 that time, once I change A1 again, I only want the future values of K7 to change.

What I've tried:

I have a column J7:J, I put in values that I'd be putting in A1, but I'd like to get rid of this cell.

2

I had to use script editor:

function onEdit(e) {
  var row = e.range.getRow();
  var dateCell = e.range.getSheet().getRange(row, 10);
  if (!dateCell.getValue()) {
    var distance = e.range.getSheet().getRange(row, 6).getValue();
    var A1 = e.range.getSheet().getRange(1, 1).getValue();
    dateCell.setValue(-(distance*A1/(15)));
  }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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