I don't like expanding formulas. First, when I modify them, I have to copy them again, it is like copy&paste programming. Second, the I'd like them to match the original range, which might change. Ideally, I'd like to define a formula and range it operates on (e.g., sheet1!B4:B) and it applies accordingly. And when I add one more row to sheet1 (which increases the open-ended range sheet1!B4:B), it automatically adds a new computed row.
I've found something that can do some of those tricks: ArrayFormula. It can simply copy some data from one sheet to another, using the open-end range. It seems it can perform some trivial operations like addition. But I am not sure how to perform some more complex operations, that might operate with ranges on their own, like sum. For example, I'd like to compute sum for sheet1:B4:B and autoexpand it (without manual expanding) to all the following columns, so the cell right to the first cell would contain sum(sheet1!C4:C), cell right to this one would contain sum(sheet1!D4:D) and so on. This doesn't look like I can just use ArrayFormula for this, but I might be wrong.
(Of course, sum is just an example, I'd like to be able to write some other formulas.)
I appreciate any idea how to do this.
.map()