M
M
Maxim Karakulov2014-12-02 14:09:35
Google Sheets
Maxim Karakulov, 2014-12-02 14:09:35

How to set a formula in a Google Docs table so that one of the variables is always taken from the same cell?

Google Docs spreadsheets have a very useful property: when you copy a formula to another cell, those variables that are in it are automatically filled with data from new cells related to the new cell by the same relative position as with the old one.
But often you need to fix one of the variables so that when copying the formula, its value would always be taken from the same cell.
For example, we have a table: how many answers have what number of likes. We write a formula that calculates what percentage of responses with each given number of likes. To do this, we must divide the number of responses by the total number of responses (stored in another plate or in a separate cell). How to write a formula so that this total number of answers is always taken from the same cell and does not change when the formula is copied?
The picture shows that when copying the formula to the second cell, the cell where the new number of answers with the given number of likes is taken from changes (instead of A2) A3, but the cell where the total number of answers is taken also changes (instead of counts!B1) counts!B2. How can I make sure that this second number is always taken from the same cell when copying the formula? (To always remain counts!B1?)
caa59f6d05b445279a9f0ce417faf344.pngc34a98e609ab4d2cb1e37da04b28d444.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
6
65536, 2014-12-02
@karaboz

Probably like in Excel. Try to put a dollar sign in front of each cell axis, that is, in your case, you need to replace B1 in the formula with $B$1. The dollar fixes the axis in front of which is written.

A
Andrey Lipattsev, 2014-12-05
@HabrAndrey

Here it is necessary to Sasha Ivanov or to the community . But in general, yes - $ solves the problem, as in Excel. And you can also put it down with the F4 key.

S
splxgf, 2014-12-04
@splxgf

As always, F4 helps (after selecting the desired cell).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question