Google-sheets – How to do math in Google Sheets relative to a cell

google sheets

I'm working on some things relating to properties of one dimensional cellular automata, and am trying to make a function in which the value of a cell in column A is equal to the sum of all other cells in its row, instead of them all being a specific row. this is to make it so that column A can be a sort of timeline of populations, is this possible, and if so, what statement should I use? For example, if row 1 has twelve live cells, then the value in A1 should be 1+1+1+1+1+1+1+1+1+1+1+1, or 12, but if row 2 has 5 live cells, then the value in A2 should be 1+1+1+1+1, or 5.

Best Answer

I admit, I don't understand some of what you're saying. But it sounds like you just need COUNTA. For instance, if all you have in each row from Column B to the far right of the spreadsheet is either countable values or blanks, you can count "live" (i.e., filled) cells in B1:1 by placing this in cell A1:

=COUNTA(B1:1)

You could then just drag this down as far as needed in Column A by clicking on cell A1, left-clicking and holding down on the tiny square that appears lower right in the blue cell border, dragging the mouse downward and then releasing.

It is also possible to count "live" (i.e., filled) cells in every row using just one formula. But if you are brand new to Sheets, it would likely be beyond what you'd be able to understand quite yet.

Re: your comment that "... so far, Google hasn't been very helpful," Google apps only do what we tell them to do; and that requires learning the tools and logical skills ourselves. There's no fast track to that. By analogy, we can't go out and buy a canvas, paints and brushes and then expect to be an artist; or expect the art store to come and paint something for us.

We each learn essentially the same way: from scratch and piece by piece. Resist discouragement and stick with it. If you do, you'll learn "piece by piece" (just like we all did), until you find yourself down the road somewhere explaining to someone else how to do something that seems "simple" to you (and yet still mysterious to them from where they stand on the road to learning).