MCPcopy Create free account
hub / github.com/analyticswithadam/App_Script / updatePrices

Function updatePrices

Ranges.js:10–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8}
9
10function updatePrices(){
11 let sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
12 let range = sheet.getRange(1,1,11,5);
13 let data = range.getValues();
14
15 for(let i = 1; i < data.length; i++){
16 data[i][2] = data[i][2] * 1.5;
17 data[i][0] = "[New Price] " + data[i][0];
18 }
19
20 let dataRange2 = sheet.getRange(14,1,11,5);
21 dataRange2.setValues(data);
22 Logger.log("Successful Run!")
23
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected