darkhorse
darkhorse

Reputation: 8782

Preserving formula of a column when adding new rows in Google Sheets

I have a sheet which looks like this:

Image 1

The C column is simply the product of column A and B. This formula is replicated in the entirely of column C, from row 2 to 1000.

However, if I add a new row between two existing rows, the formula is no longer there for that specific row. Looking around for solutions, I came across ArrayFormula. I changed my formula to the following:

=ARRAYFORMULA(IF(OR(A2="",B2=""),"",PRODUCT(A2:A, B2:B)))

However, this messed up the result. How can I solve this problem?

Upvotes: 0

Views: 549

Answers (1)

player0
player0

Reputation: 1

ARRAYFORMULA does not understand OR so you need to convert it into 0/1 logic:

=ARRAYFORMULA(IF(((A2:A="")+(B2:B="")), , A2:A*B2:B))

0

Upvotes: 1

Related Questions