F4: The Magic MS-Office Key No One Knows About

Okay, so I imagine there are some people who know about this key (say, a few developers at Microsoft), but anyone I’ve ever shown it to had no idea about its function. And it’s not a key I use often but, when I do use it, I love it!

So what is this mysterious function? Well, when you’re working in MS-Word, Excel, or PowerPoint, the F4 key will repeat the last command or keystroke you just did. It may not be immediately apparent what the advantage of this is, so I’ll provide a few examples of how I use it, and you may find other situations where it comes in handy. (And if you do, I’d love it if you’d let me know so I can share it with others.

Repeat formatting changes.

Let’s say you’ve written a Word document that has several different levels of subheadings and you decide to make changes to one of the levels. For example, in the screenshot below, “From the Contacts page.” and “From an individual member’s profile.” are at the same level.

Now, if I just wanted to unbold the heading, that wouldn’t be too big of a deal. I’d just Page Down through the document, highlight the headings I wanted to change, and click Ctrl + B, a keyboard shortcut I use all the time.

But suppose I wanted to make all those headings red, something I can’t do with a keyboard shortcut? I’d have to Page Down, then move my hand to click the Color button, and move back to the Page Down key again. (Yes, I realize that’s not exactly grueling labour, but I’m all about the efficiency…)

And if you wanted to make multiple formatting changes to each heading, that would be an even bigger hassle, because you’d have to do each one separately each time.

For example, if I wanted to make my subheadings red, a different font, and all caps, I’d have to highlight each heading and do all those commands each time (or do one command for all the headings and go through the document three times).

Instead, with my magic F4 key, I can simply highlight the first heading, open the font dialog box, make all my changes, and click OK.

That applies all those changes at once to the first heading and Word considers that a single command.

So, now, when I want to make all three changes to the next heading, I just highlight it and click F4 and voila! (If you want to try this for yourself and don’t have an appropriate Word doc handy, you can download this one here.)

Note: For those of you who use Styles, you obviously wouldn’t do this—you’d simply change the style definition. (For those of you who don’t use Styles, I plan to write a series of posts about them in the near future.)

Delete non-contiguous items.

I use this one more often in Excel than in Word. Now, the example I’m going to use here is beyond simple, but hopefully you can see how it could be helpful, especially with longer lists.

In this case, I’ve created a list of people’s names with their (made-up) ages.

If, for some reason, I wanted to delete all the men from the list, I could highlight the first name and delete the row, then use the F4 key to delete the other ones.

Now, you may be asking yourself, “why wouldn’t I just use the Delete key?” Well, there are two reasons, actually:

  • In Excel, the Delete key deletes the contents of the cell in the row, but not the entire row. To do the latter, you’d actually have to go up to the Edit menu and select Delete or use the Delete button in the ribbon (depending on your version of Excel), which is not as easy as the one-touch F4 solution.
  • If I’m using my right hand to highlight each row and move down the list, then I either have to keep moving it to hit the delete key, or have my left-hand cross all the way over the keyboard to keep pressing the Delete key. Again, that might not sound like a big deal but, for a long list, that could become rather uncomfortable after a while. With the F4 more on the left-hand side of the keyboard, it’s just a little less awkward.

Align objects.

This is a good one for PowerPoint, although it would work in Word or Excel as well, if you’re using graphical elements in them. Again, using a super-simple sample, the slide below has a number of rectangles in it that I want to align so that each column is aligned to the left and each row aligned to the top.

Like with the other examples, you have to do the first command manually. In this case, since I’m using PowerPoint 2007, I select the five boxes on the left, click the Arrange button, mouse down and highlight the Align link, then mouse over to highlight Align Left.

Without the F4 key, I’d have to do that with each column and row of boxes. Instead, I simply need to select them again and use F4 to repeat the alignment. MUCH faster. (Note that you would still have to repeat the complete steps to do the top alignment for the first row.)

So there are three specific examples of how you can use the F4 key to save you a little time, effort, and frustration. In general, you may find the key helpful in situations where:

  • You’re repeating a command many times, AND
  • The command doesn’t have its own convenient keyboard shortcut (and especially if it involves several steps)

A couple of extra notes:

  • If you interrupt the repeated command with another action, the new one will become the one that is repeated. So, for example, if you’re changing a bunch of heading styles and, as you’re going through the doc, you spot a typo and delete the word, Delete is now the new command that will be repeated.
  • If you’re typing text, the program considers the entire string that’s been entered as a single command, not just the last letter. For instance, if you type “The rain in Spain stays mainly in the plain.” and hit the F4 key, that entire sentence will be repeated, not just the period at the end. I’m not 100% sure this is the case with every version of Word, but it does apply to 2003 and 2007.

Again, if you discover any other situation where you find this feature helpful, please send it along!

Last Updated: April 17, 2009

If you found this post helpful, please share it.

Enter your email address to receive more tech tips right in your Inbox.


  1. rynn says

    You most certainly do not need to “do each one separately each time.” …. nor do you need to “change the style definition”.

    Put the cursor where you want to make the changes, right click its Style, and select “Select all instances”. Then make your changes. THAT is how you make multiple changes to identical text.

    Boy oh boy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Current ye@r *