'Google sheet Array Function auto fill

Hello i am trying to make google sheet array function to auto fill formula in case of Column C have any value Like a,b,c, Etc i have try this but its not work

=arrayformula(IF(C2:C="","",F1-D2:D+E2:E))

Image

image 2



Solution 1:[1]

First solution

in F1

=arrayformula(E1:E-D1:D)

in G1

=arrayformula(SUMIF(ROW(D1:D),"<="&ROW(D1:D),F1:F))

enter image description here

other solution, in F1

=arrayformula(mmult(1*(transpose(row(D1:D))<=row(D1:D)),E1:E-D1:D))

MMULT

enter image description here

Solution 2:[2]

Try This !

=ArrayFormula(IF(C2:C="",,INDIRECT("F1:F"&ROWS(F:F)-1)-D2:D+E2:E))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Vishu Sharma