Search code examples
arraysif-statementgoogle-sheetsbooleannested-if

Add columns to an existing source of data


I would like to add several columns to an existing source of data displayed in a sheet. But as a data source, the number of rows can increase. I don't want to update the sheet once it is set up, it should be automatic. In those new columns, I would like formulas.

Please find below the result expected.

  • in blue, columns from data source
  • in red, my new columns with a formula

enter image description here

How can I do ?

Thank for you help 🙏


Solution

  • use in E1:

    ={"new col 1"; ARRAYFORMULA(IF(C2:C="";;IF((ISNUMBER(C2:C))*(C2:C>=2); 1; 0)))}
    

    use in F1:

    ={"new col 2"; ARRAYFORMULA(IF(D2:D="";;IF((ISNUMBER(D2:D))*(D2:D>=2); 10; 0)))}
    

    enter image description here