A "constant" in google spreadsheet?

Aximili picture Aximili · Apr 4, 2016 · Viewed 21.2k times · Source

Say I have 2 columns: (this is extremely simplified)

  • Data = a number
  • Result = Data * 1.2

I can put B2 = A2*1.2, then drag and drop B2 down...
enter image description here
and it fills all the other cells, which is perfect.
enter image description here

But can I put this multiplier (1.2) somewhere as a "constant"? (for clarity and being easily editable)

Say I put it in E1, and set B2 = A2*E1.
Now I can't drag and drop anymore (because E1 becomes E2 E3 and so on)
enter image description here
In this example, is there a way to make E1 stay as you drag it down?

Answer

Rubén picture Rubén · Apr 4, 2016

Short answer

Use an absolute cell reference or a named range

Explanation

Instead of E1, which is a relative cell reference, use $E$1 which is an absolute cell reference.

An alternative is to to assign a name to the cell E1, let say, "constant"

In the first case the formula will be

=A2*$E$1

In the second case

=A2*constant 

References