how can i past only in Blank cell not all of Cell
this script is writing all cell in C to same Value as B but i just need to Write only Blank Cell with the value of B.
can some one find the error in this funktion????
function fill() {
var tss = SpreadsheetApp.getActiveSpreadsheet();
var values = tss.getRange("data!C:C").getValues();
for(i=0; i<values.length; i++) {
var value = values[i][0];
if (value == "") {
var rangeA = tss.getSheetByName("data").getRange(i+1,2);
var rangeB = tss.getSheetByName("data").getRange(i+1,3);
var copypaste = tss.getSheetByName("data");
if(!rangeA.isBlank()) {
copypaste.getRange("B2:B").copyTo(copypaste.getRange("C2:C"),{contentsOnly:true})
}
}
}
}