Keep Variable Cell Constant in Excel & Google Sheets

Written by

Editorial Team

Reviewed by

Laura Tsitlidze

Last updated on March 15, 2023

This tutorial demonstrates how to keep variable cells constant in Excel and Google Sheets.


variable cell constant 4


Keep Cells Constant in Formulas

When you copy a formula, cell references in the formula change depending on where you paste. If you want to keep variable cells constant, you can lock them before copying the formula. In this example, Column C is the result of the multiplication of values from A2 (2) and Column B.


variable cell constant 1


If you copy the formula down Column C, both cell references change (A2 to A3 and B2 to B3, etc.).


variable cell constant 2


Say you want to keep cell A2 constant. To do that, click on the cell reference in the formula bar (A2), and enter $ before the column and row ($A$2).

You can also press F4 while in the formula bar to add the same dollar signs (before column reference and row reference). If you continue to press F4, it cycles through more absolute/relative referencing options.


variable cell constant 3


As a result, Column C’s formula uses cell A2 as a constant, and the values from Column B are multiplied by 2 in every row.


variable cell constant 4


Note: In the newer version of Excel, there are new arrays formulas that automatically spill the values to the range, and don’t need any cell locking. These formulas include SORT, UNIQUE, SORTBY, and XLOOKUP.

Keep Variable Cells Constant in Google Sheets

You can use the same logic to make variable cells constant in Google Sheets.


absolutes gs


See also…

Looking for something else? Want some additional info? Try these:

AI Formula Generator

Try for Free

See all How-To Articles