How do I replace a value in one cell based on value in another cell?

function CopyinData_AM_A() {
/* Edit the vars below this line for your needs */
var sourceSheet  = "Students AM" ;  // Enter the name of the sheet with the source data
var sourceRange = "B7:N77" ; // Enter the range of the cells with the source data
var targetSheet = "Students AM A" ; // Enter the name of the target sheet
var targetRange = "B7:N77" ; // Enter the range of cells you wish to copy data to. Note this must be same size as source range.
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(sourceSheet);
var values = sheet.getRange(sourceRange).getValues();
ss.getSheetByName(targetSheet).getRange(targetRange).setValues(values);
}

How would I add this into the above script? The action needs to occur after the data is copied into the sheet. I am only a VB coder. 'Students AM A' is a formula free sheet.

      For each cell in ‘Students AM A'!N7:N77 then
              If Ncell= ‘Menu!D14' then Hcell = ”O"
              Check next cell
      End

I'd have zero issue doing this in VB, I just started using google scripts about 3 months ago. Anyone recommend a good book to assist me in learning this google script stuff?



from Recent Questions - Stack Overflow https://ift.tt/3rDU5Th
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation