LearnExcel.io
Menu

How to Keep a Number Constant in Excel

Written by ··Updated June 16, 2026
How to Keep a Number Constant in Excel

To keep a number (cell reference) constant in Excel, turn it into an absolute reference by adding a dollar sign before both the column letter and row number — for example, $B$2. The fastest way is to click the reference in the formula and press F4 (on a Mac, press Cmd+T or fn+F4), which locks it so the value won’t shift when you copy or fill the formula across other cells.

Are you tired of constantly having to enter the same number over and over again in different cells in your Excel spreadsheet? Do you want a quicker and easier way to keep a number constant without having to manually input it each time? Look no further than this guide on how to keep a number constant in Excel. Whether you’re working on a small or large scale project, this simple trick can save you time and increase your efficiency in data entry. Follow these easy steps to keep your numbers constant and save yourself some hassle in Excel.

Introduction

When working on Excel spreadsheets, it’s common to have a recurring need to enter the same value in multiple cells. This can be time-consuming and prone to errors if you manually enter the value each time. However, Excel offers a feature that allows you to keep a number constant, regardless of how many times you use it in your spreadsheet. In this guide, we’ll show you how to keep a number constant in Excel, step-by-step.

Step 1: Open your Excel Spreadsheet

To start, open your Excel spreadsheet and navigate to the cell where you want to enter your constant number. You can also select multiple cells by clicking and dragging on your spreadsheet.

Step 2: Enter your Constant Number

Enter the constant number you wish to use in your selected cell(s).

Step 3: Highlight the Cell

Next, highlight the cell containing the constant number you wish to keep. This can be done by clicking on the cell or clicking and dragging over multiple cells.

Step 4: Press F4

Once you have your cell(s) highlighted, simply press the F4 key. This will add dollar signs in front of both the column letter and row number of the selected cell(s), indicating that the number is a constant.

On a Mac, the F4 shortcut is Cmd+T in Excel; if you prefer the function key, press fn+F4 so macOS doesn’t intercept it. Pressing F4 (or Cmd+T) repeatedly cycles through the reference types — $B$2 (fully locked), B$2 (row locked), $B2 (column locked), and B2 (relative) — which is exactly how you create a mixed cell reference in Excel when you only want to lock the row or the column. This is the same behavior described in our guide to making an absolute reference in Excel.

Step 5: Test your Constant Number

You can test your constant number by clicking on any cell and verifying that the cell reference of the constant number appears with dollar signs in front of both the column letter and row number. No matter how many times you use this constant number in your spreadsheet, Excel will always identify it as a constant.

Keeping a number constant in Excel can save you time and reduce the risk of errors in your spreadsheet. Follow the above steps to keep your numbers constant and use this quick trick to streamline your workflow when working with Excel spreadsheets.

Additional Tips

While keeping a number constant in Excel is a useful feature, it’s important to note that constant numbers can’t be edited directly. To change the value of a constant number, you’ll have to remove the constant status by deleting the dollar signs from its reference before making any changes. Furthermore, constant numbers may impact certain calculations or functions in your spreadsheet, so be sure to double-check the results of any formulas that use them.

In addition to keeping a number constant, Excel offers a number of related features that can help you work more efficiently with your data. For example, you can create named ranges in Excel to assign a name to a specific cell or range of cells, making it easier to reference them in formulas or functions. You can also use cell styles to quickly format your data according to pre-set formatting templates.

It also helps to understand how cell references work in Excel, since keeping a number constant is really about controlling whether a reference is absolute or relative. When you use an absolute reference in Excel, the locked cell stays put even as you copy a formula in Excel or drag a formula down a column. If you want to protect the cell itself from edits rather than just lock its address, see how to lock a cell in an Excel formula.

Overall, the ability to keep a number constant in Excel can be a valuable tool for anyone working with spreadsheets on a regular basis. By following the steps outlined in this guide, you can easily keep your numbers consistent and save yourself time and effort in the process. Moreover, you can further optimize your Excel workflows by exploring other related features and techniques.

FAQ

Here are the answers to some of the common questions related to keeping a number constant in Excel:

Can I keep other types of data constant besides numbers?

Yes, you can use the same technique to keep other types of data constant in Excel, such as text, dates, or formulas. Simply enter the data you want to keep constant, highlight the cell, and press F4 to add the dollar signs.

What is the difference between a constant and a formula in Excel?

A constant is a static value that doesn’t change, while a formula is a dynamic calculation that updates based on changes to the data it references. By keeping a number constant in Excel, you ensure that it always has the same value regardless of any changes to your spreadsheet.

How can I remove the constant status from a cell?

To remove the constant status from a cell, simply delete the dollar signs from its reference. This allows you to edit the cell’s value directly like any other value in your spreadsheet.

Can I use constants in formulas or functions in Excel?

Yes, you can use constants in formulas or functions in Excel, just like any other value in your spreadsheet. When a constant is used in a formula, it will retain its original value and won’t update even if other cells in the formula have changed.

Will constant numbers impact calculations or functions in my spreadsheet?

Depending on your formula or function, constant numbers may impact certain calculations in your spreadsheet. To be sure, it’s always a good idea to double-check the results of your formulas or functions when using constants.

Frequently Asked Questions

How do I keep a cell reference constant when I copy a formula?

Add a dollar sign before the column letter and the row number to make it an absolute reference, such as $B$2. Once a reference is locked this way, it won’t change as you copy the formula to other cells or drag a formula down a column. Read more in our guide to using an absolute reference in Excel.

What does the F4 key do in an Excel formula?

While editing a formula, click (or place your cursor on) a cell reference and press F4 to insert dollar signs and lock it. Pressing F4 again cycles through $B$2, B$2, $B2, and back to B2, letting you lock the row, the column, both, or neither. This is the fastest way to create a mixed cell reference in Excel.

What is the F4 shortcut for keeping a number constant on a Mac?

On Mac versions of Excel, press Cmd+T to toggle absolute and relative references, since F4 is often reserved by macOS. If you’d rather use the function key, press fn+F4 so macOS doesn’t trigger its own F4 action. Both do the same thing as F4 on Windows.

What is the difference between an absolute and a relative reference?

A relative reference like B2 shifts when you copy the formula, while an absolute reference like $B$2 stays fixed. Understanding how cell references work in Excel makes it easier to decide which parts of a reference to lock. See also how to make an absolute reference in Excel.

How do I lock only the row or only the column?

Place the dollar sign in front of just one part of the reference: B$2 locks the row but lets the column move, and $B2 locks the column but lets the row move. You can create these mixed references quickly by pressing F4 (or Cmd+T) repeatedly until the dollar signs appear where you want them.

How is keeping a number constant different from locking a cell?

Keeping a number constant locks the cell address in a formula so the reference doesn’t move when copied. Protecting a cell from being edited is a separate feature — for that, see how to lock a cell in an Excel formula. You can also use named ranges to reference a fixed cell by name instead of using dollar signs.

Related guides

How To

Why Does Excel Keep Freezing

“Experiencing freezing issues on Microsoft Excel? Learn why it happens and how you can troubleshoot the problem in this informative blog post.”

May 21, 2023

How To

How to Keep Leading Zeros in Excel

Learn how to keep leading zeros in Excel with our comprehensive guide. Never worry about losing important data again! Step-by-step instructions included.

May 20, 2023

View all How To guides →