Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Arrayformula and Sum in Google sheets

How do I make this formula into an ArrayFormula in google sheets..
=IF(A1="online", SUM(B1,C1,D1,E1,F1), B1)

I want the row number to change for each column in formula and then this formula to apply itself infinitely down the column

=ArrayFormula(IF(A1:A="online", SUM(B1:B, C1:C, D1:D, E1:E, F1:F), B1:B))
I have found that this will add together all cells from columns B, C, D,… and add them together rather use them as a range and take the cell’s figure and add it to the other cells in the row.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Hope that make sense! Thanks in advanced!

>Solution :

You may try:

=byrow(B:F,lambda(Σ,if(indirect("A"&row(Σ))="online",sum(Σ),index(Σ,,1))))

OR

=ArrayFormula(IF(A:A="online", B:B+C:C+D:D+E:E+F:F, B:B))
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading