So, right now I'm building a KPI that need to create a single flow KPI submission using Google Form to Google Sheet. You can see my example in sheet here and Google form here
Right now I'm using lookup value from 3 criteria (with INDEX and MATCH function) that i made but here's the problem. I know that google form will create a new row under the existing row instead of replicate it when a submission was entered. But, i need to fill my 'E' and 'F' column (from my example) automatically, after the google form or 'A until D' column was entered.
I've tried some code using Script editor in Sheet that will generate one active column that i highlighted to drag down automatically when im running the script. This method won't be effective if i had to apply it one by one for 10-20 columns...
Here's the google script code:
function myFormula(){
var activeSheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var tabs = ['Form Responses 1'];
var columns = [5,6];
if(tabs.indexOf(activeSheet.getName()) !== -1){
var cell = activeSheet.getActiveCell();
var col = cell.getColumn();
if(columns.indexOf(col) !== -1){
if(cell.getFormula() !== ""){
var destination = activeSheet.getRange(2,col,activeSheet.getLastRow()-1, 1);
cell.copyTo(destination);
}
}
}
}
So, can you guys please help me with it? I will appreciate it if you would help me with my projects. Thankyou.