0
votes

I have a spreadsheet for my companies inventory that has a sheet for the data, and then a sheet for the overall.

What I want is when I enter the date in Column B for the specific item, I want that cell to appear on the overall page in the appropriate cell.

Sample Spreadsheet: http://goo.gl/aOuCYU

On the sample spreadsheet, I want on Sheet1, cell B11-B15 to automatically populate the last date entered on sheet Customer 2 column A. So right now, it should populate 1/25/2015. Then when I enter the next entry on Customer cell A6 (2/15/2015) Sheet1 cell B11 will show the date I posted (2/15/2015).

Does this make sense? Haha I hope I explained it well enough.

Thanks in advance. Jeremy

1
Sorry, posted the published link, editable link is here: goo.gl/ZT9Zsl - Jeremy Davies

1 Answers

0
votes

You can create an onEdit() function that does what you want. Under the TOOLS menu, choose SCRIPT EDITOR. This code should get you started:

function onEdit(e) {
  var cellEdited = e.range.getA1Notation();
  var sheetEdited = e.range.getSheet().getSheetName();

  Logger.log('cellEdited: ' + cellEdited);
  Logger.log('sheetEdited: ' + sheetEdited);

  var valueOfEdited = e.value;
  Logger.log('valueOfEdited: ' + valueOfEdited);

  var ss = SpreadsheetApp.getActiveSpreadsheet();

  if (sheetEdited === "Customer 2") {
    //Put data into sheet 1 under Customer 2

  };

};