Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

F4 in Excel Formula: How to Use Absolute References

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Pressing the F4 key while editing a cell reference in an Excel formula toggles the reference between relative, absolute, and mixed modes by adding dollar signs ($) to the column and row. This allows you to lock a specific cell so that when you copy or drag the formula to other cells, the reference to that specific cell remains constant instead of shifting based on the new position.

What You'll Need

  • A computer with Microsoft Excel installed (Windows or macOS).
  • A dataset or a few cells containing numbers to practice the locking mechanism.
  • A keyboard with a function row (F1-F12). If using a laptop, you may need to hold the "Fn" key simultaneously.

Step-by-Step

  1. Select your target cell: Click on the cell where you want to enter your formula.
  2. Start the formula: Type the equals sign (=) to begin the calculation.
  3. Select the first reference: Click on the cell you want to reference or type the cell address (e.g., A2).
  4. Apply the F4 shortcut: Immediately after selecting the cell reference, press the F4 key. You will notice that Excel automatically adds dollar signs to the reference, changing A2 to $A$2.
  5. Complete the formula: Continue typing your formula. For example, if you are multiplying a list of prices by a single tax rate in cell B1, your formula might look like =A2*$B$1.
  6. Press Enter: Finalize the formula by pressing the Enter key.
  7. Drag the fill handle: Click the small green square in the bottom-right corner of the cell and drag it down the column. Notice that while the first reference (A2) changes to A3, A4, etc., the locked reference ($B$1) stays exactly the same in every cell.

Common Mistakes

One of the most frequent errors is pressing F4 at the wrong time. If you press F4 after you have already pressed Enter to finish the formula, nothing will happen because you are no longer in "Edit Mode." You must double-click the cell or press F2 to re-enter the formula before the F4 shortcut will function.

Another common mistake is over-locking. Users often lock every single cell in a complex formula, which defeats the purpose of Excel's dynamic range capabilities. If you lock every reference, you cannot drag the formula to apply it to other rows or columns, forcing you to rewrite the formula manually for every single cell. Only lock the cells that act as constants, such as a tax rate, a goal percentage, or a specific date.

Many laptop users assume the F4 key is broken when it doesn't work. On most modern laptops, the top row of keys is mapped to media controls (volume, brightness) by default. If pressing F4 changes your volume instead of adding dollar signs, you are missing the "Fn" modifier. You must hold the Fn key (usually located near the Ctrl key) and then press F4.

Tips

Understand the "Cycle" of F4. The F4 key does not just turn locking on and off; it cycles through four different states. Pressing it repeatedly will change the reference in this specific order:

  • First Press: Absolute Reference ($A$2) - Both the column and the row are locked. No matter where you move the formula, it always points to cell A2.
  • Second Press: Mixed Reference (A$2) - Only the row is locked. If you drag the formula horizontally, the column will change (B$2, C$2), but if you drag it vertically, the row stays at 2.
  • Third Press: Mixed Reference ($A2) - Only the column is locked. If you drag the formula vertically, the row will change ($A3, $A4), but if you drag it horizontally, the column stays at A.
  • Fourth Press: Relative Reference (A2) - No locks are applied. The reference moves freely in all directions.

To speed up your workflow, use the F4 key while you are still typing the formula rather than going back to fix it later. This prevents the "calculation drift" that happens when you drag a relative formula down and realize halfway through that your results are wrong because the reference shifted.

For those working with very large datasets, consider using Named Ranges as an alternative to F4. By selecting a cell and giving it a name (like "TaxRate") in the Name Box, you can use =A2*TaxRate. Named ranges are absolute by default, meaning they behave like an F4-locked cell without needing the dollar signs.

Troubleshooting

The F4 key does nothing: First, check if your keyboard has a "Fn Lock" key. If it does, toggle it. If not, try holding the Fn key while pressing F4. If you are using Excel on a Mac, the equivalent shortcut is Command + T, though some Mac keyboards support F4 depending on the system preferences.

The dollar signs are there, but the value is still changing: This usually happens if you are using a Table (Ctrl+T) with structured references. Structured references (like =[@Price]*$B$1) behave differently than standard A1 references. Ensure you are clicking the specific cell you want to lock rather than selecting the entire column header of a table.

I locked the cell, but I'm getting a #REF! error: A #REF! error typically occurs when a cell that the formula refers to has been deleted. Locking a cell with F4 does not protect the cell from being deleted; it only prevents the reference from shifting. If you delete row 2, any formula referencing $A$2 will break, regardless of the dollar signs.

I can't find the F4 key on my compact keyboard: Some 60% keyboards or specialized peripherals hide the function row. Check your manual for the secondary layer key (often labeled Fn or AltGr) that allows you to access the F-keys. If all else fails, you can always type the dollar signs manually using Shift + 4.

Frequently Asked Questions

What is the difference between a relative and absolute reference?

A relative reference (A1) changes based on where the formula is moved. If you copy it one cell down, it becomes A2. An absolute reference ($A$1) is "pinned" to that specific cell and never changes, regardless of where the formula is copied.

Can I lock an entire range of cells using F4?

Yes. If you select a range (e.g., A1:B10) while writing a formula, pressing F4 will apply the dollar signs to both the start and end of the range, resulting in $A$1:$B$10. This is essential for functions like VLOOKUP or SUMIFS.

Does F4 work in Google Sheets?

Yes, the F4 key functions almost identically in Google Sheets as it does in Microsoft Excel, cycling through the same absolute and mixed reference options.

Why would I use a mixed reference instead of a fully absolute one?

Mixed references are useful for creating multiplication tables or grids. For example, if you lock only the row (A$1), you can drag the formula across columns to reference different headers while keeping the formula pinned to the top row.

Is there a way to lock cells without using the keyboard?

The only way to lock a cell without a keyboard shortcut is to manually type the dollar signs ($) before the column letter and the row number within the formula bar.