I have a two sheets "One" and "Two"
I want column A in "One" to reference column B in "Two" the following works fine up to a point.
A1 = Two!B1
Then I use the fill to populate the rest of the column. The problem is in Two I continually want to add a column to the left of B which becomes the new B. I want A1 to reference the new B1, but spreadsheets automagically updates all reference in One to C instead of B. Is there a way to force B to remain static?
To override this default behavior, Use a $ sign to keep the reference "static" when pasting the formula into other cells. For example, if you are in cell A1 and the formula in that cell references B1 , then if you copy-paste this formula into cell A2 , the formula actually pasted in the cell references B2 .
Say you want to keep cell A2 constant. To do that, click on the cell reference in the formula bar (A2), and enter $ before column and row ($A$2). You can also press F4 on the keyboard to make variable cell constant.
The shortcut for locking your cell reference is to use F4 on your keyboard. After you select your cell for your formula, press F4 to place two dollar signs in your cell reference for an absolute cell reference. Press F4 twice for locking row reference, and press F4 three times for locking column reference.
If you want to maintain the original cell reference when you copy it, you "lock" it by putting a dollar sign ($) before the cell and column references. For example, when you copy the formula =$A$2+$B$2 from C2 to D2, the formula stays exactly the same. This is an absolute reference.
Yes.
Use $A$1 to make the reference remain static.
Read more here: http://www.gcflearnfree.org/googlespreadsheets/14.3
TLDR;A1
is a reference relative to the current cell. Copy-paste will update this reference.$A$1
is a static reference to a specific cell. Copy-paste will not change this reference.
Relative and Absolute References in Google Sheets and Excel.
Spreadsheets do the heavy lifting for you, by defaulting cell references in formulas as a "relative" to the current cell.
To override this default behavior, Use a $
sign to keep the reference "static" when pasting the formula into other cells.
For example, if you are in cell A1
and the formula in that cell references B1
,
then if you copy-paste this formula into cell A2
, the formula actually pasted in the cell references B2
. This is generally what we want.
However, if you are in cell A1
and the formula in that cell now says $B$1
(it will still reference the cell B1
, as before), but
then if you copy-paste this formula into cell A2
, the formula actually pasted in the cell will still say ($B$1)
(and still reference the cell B1
).
You can also use "mixed" references, where only the column or row is static, and the other is a dynamic reference. For example $B1
or B$1
.
This link gives a good example and use case (creating multiplication tables) for mixed references, as well as static vs relative references, and warns to always use static references with vlookup
and arrays: Relative and Absolute References in Google Sheets and Excel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With