F4 in Excel: Repeat Last Action and Toggle Cell References

F4 in Excel

Have you ever applied formatting to a cell and wanted to apply the same formatting to other cells?

Or have you ever worked with formulas and wanted to quickly change a cell reference from relative to absolute?

You can do both using the F4 key in Excel.

The F4 key performs two different actions depending on what you are doing:

  • Repeat the last action: Repeats the last action you performed, such as applying formatting.
  • Toggle cell references: Changes cell references between relative, absolute, and mixed references while editing a formula.

Let’s see how both options work.

1. F4 to Repeat the Last Action in Excel

You can use the F4 key to repeat your last action in Excel. This is useful when you want to apply the same formatting or repeat an action without going through the steps again.

Example: Repeat Cell Formatting Using F4

Suppose you have a worksheet with a list of employee names and want to highlight one of the names using a yellow fill colour.

Follow these steps:

  1. Select the cell you want to format.
  2. Go to the Home tab on Ribbon.
  3. Click Fill Color and choose Yellow.
  4. Now select another cell where you want to apply the same formatting.
  5. Press F4.

Excel repeats the previous formatting action and applies the same yellow fill colour to the selected cell.

You can continue selecting other cells and pressing F4 to repeat the same action.

Note: F4 repeats the last action only when that action can be repeated in Excel. It does not repeat every action.

2. F4 to Toggle Cell References in Excel Formulas

The F4 key is also useful when working with formulas.

It allows you to quickly change a cell reference between four different types:

  • Relative reference
  • Absolute reference
  • Mixed reference with a fixed row
  • Mixed reference with a fixed column

You don’t need to type the dollar ($) symbol manually. Just press F4 to change the reference.

Example: Using F4 to Change Cell References

Suppose you have the following formula:

=A1*B1

Here, both A1 and B1 are relative cell references.

If you want to change A1 into an absolute reference, follow these steps:

  1. Click the cell containing the formula.
  2. Press F2 to edit the formula.
  3. Place the cursor next to or inside the cell reference A1.
  4. Press F4.

Excel changes the reference from A1 to $A$1.

What Happens When You Press F4 Repeatedly?

When you press F4 repeatedly while editing a cell reference in a formula, Excel cycles through four reference types.

F4 PressCell ReferenceType
First press$A$1Absolute reference
Second pressA$1Mixed reference (fixed row)
Third press$A1Mixed reference (fixed column)
Fourth pressA1Relative reference

After the fourth press, the reference returns to its original form.

What Happens When You Press F4 Repeatedly?

Difference Between Relative, Absolute, and Mixed References:

Reference TypeExampleWhat It Does
RelativeA1Changes row and column when copied
Absolute$A$1Keeps both row and column fixed
MixedA$1Keeps the row fixed
Mixed$A1Keeps the column fixed

For a detailed explanation, see our guide to Relative and Absolute Cell References in Excel.

Important Things to Remember:

  • F4 repeats the last action performed in Excel when the action supports repetition.
  • While editing a formula, F4 changes the selected cell reference.
  • Press F4 repeatedly to cycle through relative, absolute, and mixed references.
  • You can use F2 to edit a formula before changing its cell references.
  • On some laptops, you may need to press Fn + F4 because of the function key settings.

Frequently Asked Questions:

1. What does F4 do in Excel?

F4 has two main uses in Excel. It repeats the last action you performed, and it changes cell references between relative, absolute, and mixed references while editing a formula.

2. How do I repeat the last action in Excel?

After performing an action, select another cell and press F4. Excel repeats the previous action if it supports repetition.

3. How do I make a cell reference absolute using F4?

While editing a formula, place the cursor inside the cell reference and press F4. Excel adds dollar signs to both the column and row, changing the reference to an absolute reference.

For example, A1 becomes $A$1.

4. Why is F4 not working in Excel?

On some laptops, the function keys have additional functions. You may need to press Fn + F4 instead of F4.

Also, remember that F4 performs different actions depending on whether you are editing a formula or repeating an action.

Final Thoughts:

The F4 key is a useful shortcut in Excel because it helps you save time in two different ways.

You can use it to repeat your last action or quickly change cell references while working with formulas.

Instead of repeating the same steps or typing dollar signs manually, simply use the F4 key.

For more useful shortcuts, check out our complete guide to Excel Keyboard Shortcuts.


Discover more from Excellopedia

Subscribe to get the latest posts sent to your email.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.