Search code examples
google-sheetsspreadsheetworksheet-functionformulas

How to create a formula for every row in a column in Google SpreadSheet?


I use three columns. "H", "O" and "I". In column "I", I have a formula every row =IF( OR( O3 = "Yes",H3 = "Yes"),"Yes","No") and then for the next row I have =IF( OR( O4 = "Yes",H4 = "Yes"),"Yes","No").

How do I copy the formula for the new rows being added to the worksheet without having to write any code behind? i.e. purely using formulas. e.g. for arithmetic operations I can use something similar to below. =ARRAYFORMULA(IF(E3:E,E3:E*F3:F,0))

Can I use a similar approach for here as well? if Yes, How do I exactly use it for my case?

I'm using Google Spreadsheets.


Solution

  • If you want to use OR in Arrayformula you'll need to use +. Can you see if this works ?

    =ArrayFormula(IF(LEN(H4:H), IF((O4:O = "Yes")+(H4:H = "Yes"),"Yes","No"),))