In Google Sheets, I'm trying to return the absolute values of a cell, using app script. So far I have the following code:
var SEARCH_COL_IDX = 1; // variable that indicates which column to search, 0 = column A
function SearchInventario() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var formS = ss.getSheetByName("EntryFrmMovimiento"); //Form sheet that captures data
var str = formS.getRange("E4").getValue(); //cell that contains search criteria
var values= ss.getSheetByName("DataInventario").getDataRange().getValues();//Tab with dataset
for (var i = 0; i < values.length; i++) {
var row = values[i];
if (row[SEARCH_COL_IDX] == str) {
formS.getRange("C10").setValue(row[0]);
formS.getRange("C11").setValue(row[1]);//This is the cell for which I need Absolute value
}}}
It returns the data in the dataset fine, but I need cell C11 to then be converted to absolute value in this tab but not in the original dataset.
Any hits, tips or ideas will be greatly appreciated!