5 Keyboard shortcuts for writing better formulas

As an analyst (or manager), I bet a good portion of your Excel time is spent writing formulas and getting the results.

So today, let us learn 5 important keyboard shortcuts that will save you a lot of time and help you write better formulas.

F2: Edit a formula cell. When you select a cell and press F2, Excel places cursor at the end and lets you edit the cell value / formula.

F3: Paste names in to formula. When you have a lot of names, often remembering them can be tricky. Whenever you want to type a name, press F3 instead. Excel will show a list of all names and pick what you want.

Tab: Auto-complete functions, names, structural references. As you start typing a formula, Excel shows auto-complete suggestions. Use arrow keys to select the function, name or structural reference you want, Press Tab key to let Excel type it for you. You can save a ton of time by just arrow key + tabbing.

F4: Switch reference styles – Absolute > Mixed > Relative > Absolute. When typing formulas, often you may want to change a certain cell reference to Absolute or Mixed or Relative. You can use F4 key to do the switching. Just place cursor inside the range / cell address and press F4 to cycle thru all available reference styles. (more: Guide to Excel cell references and when to use what?)

ALT + ESF: Paste Formulas only. If you just want to make a copy of the formulas and omit cell formatting etc., copy the cells with formulas, go elsewhere, press ALT + E and then S and F. And you get a copy of the formulas alone.

Bonus Shortcuts & Tricks:

Writing and editing formulas is such an important part of Excel that there are many other useful shortcuts and tricks. Here are a few of my favorites:

F9: Evaluate selected portion of a formula. Select a portion of a formula and press F9 to evaluate it alone. See the results and debug easily. (related: debug formulas using F9)

Use mouse to edit formula ranges: When you select a cell with formula and edit it (by pressing F2), you can see these blue, green, red rectangles around the cells to which the formula is talking. You can move these rectangles or resize them to edit the formula input ranges. Very useful and very time saving. (more: Using mouse to save time in Excel)

Fill down / side ways: Once you have a formula in a cell, you can drag it down or sideways (using mouse) to fill the formula down or across.

What are your favorite shortcuts for writing / editing formulas?

I am sure there are tons more shortcuts that I have omitted. So go ahead share your favorite ones in comments. Teach us something new. Go.

Sign-up for our FREE Excel tips newsletter:

Here is a smart way to become awesome in Excel. Just signup for my FREE Excel tips newsletter. Every week you will receive an Excel tip, tutorial, template or example delivered to your inbox. What more, as a joining bonus, I am giving away a 25 page eBook containing 95 Excel tips & tricks. Please sign-up below:

52 Responses to “5 Keyboard shortcuts for writing better formulas”

There is a way to customize your keyboard in Excel: Tools > Customize Keyboard. Save the desired action/keyboard combination there and you won’t have to look for a shortcut again.

If what you’re hoping to do isn’t possible in Customize Keyboard, there is still salvation. Before working in your spreadsheet, go to System Preferences > Keyboard. Check “Use all F1, F2, etc. keys as standard function keys”. This will take away from your Mac controls to increase brightness or sound, for example; however, it will let you use the F2 keys as indicated in Excel.

When done, just go back to your System Preferences and uncheck the box to restore defaults to the Function keys.

I use a similar setup but have Alt+2 as the format painter. Paste Formats is probably better because the format painter requires you to use the mouse unless you are painting an adjacent cell.

For those that don’t know, these are references to the Quick Access Toolbar (QAT). You can add any menu command to the QAT by right clicking it > Add to Quick Access Toolbar.

Each button in the QAT is assigned a number for a keyboard shortcut. You can see the numbers by pressing the Alt key. So Alt+1 is the keyboard shortcut for the command in the furthest left position of the QAT

Alt+J+T+A will highlight the Table Name box when you have a cell selected inside a structured reference table. This is handy when you are renaming tables from their default name since you are NOT prompted to name the table when you press Ctrl+T to create it. Even if you are not renaming the table, the Alt+J+T+A shortcut will allow you to see the name of the table you are currently in. The table name is only displayed on the Design tab of the ribbon when a table is selected.

A cautionary note – I just bought a new HP laptop with a UEFI “BIOS”. The laptop was pre-installed with the function keys disabled and the HP special functions enabled. It is incredibly annoying to press F2 and watch the screen dim! The function keys are accessed by pressing fn + F-key – try using keyboard shortcuts now.

Supposedly you can reverse this by altering the UEFI “BIOS” but I haven’t yet worked out how.

@Grant
To access the BIOS setup
Press the Power Button
Press and hold the Esc key until a menu pops up.
You should get a menu like:
(F1) System Information
(F2) System Diagnostics
(F7) HP SpareKey
(F9) Boot Device Options
(F10) BIOS Setup
(F11) System Recovery for Consumer Notebooks
(F11) System Recovery for Business Notebooks
(F12) Network Boot

It will be laid out differently to that

Otherwise you can just press the appropriate Function button just after the machine is turned on instead of the Esc key

Instead of Alt + ESF, use Ctrl-V to paste (as you would naturally) and then press Ctrl to open the little pop-up menu and then “F” for “formula” (or other letters for the other options – they are displayed when hovering over the icons).

Could you please share with me a keyboard shortcut that allows me to trace all precedents in a cell formula that is calculated based on input cells in multiple other sheets? I am aware of “Ctrl + [” but this shortcut directs me (only) to the first precedent in the cell formula.

If your precendents are on another sheet, you will see a black dashed arrow with a small spreadsheet icon at the end of it when you use the shortcuts above. If you double click on the line of the arrow, the Go To box will appear and you can view and navigate to the precendents or dependents. It is important to note that you have to double click on the black dashed line leading to the box, and not the box itself. The mouse cursor will change to a pointed arrow when you are hovering over the line, this is when you double click.

These shortcuts come from Excel 2003, but they still work in 2007 and later versions.

Personally speaking, I find the use of a mouse debilitating for spreadsheet maneuvering. I was hoping to learn if there was a more advanced form of “Ctrl + [” that allows me to toggle between all the arguments in a cell formula.

Another tip for auditing formulas (on top of F9 for evaluating part of it):
1) If formula is simple, you can hit Ctrl + [ to go to the cell the formula refers to (first refence is formula refers to several cells)
2) If formula is complicated, you can select a part of it (just like for F9) and hit F5 (or Ctrl+G) and just hit ENTER, this will jump to the worksheet and area where the referred cell(s) is while still being in formula editing mode.

Ctrl+1 Format menu, I use this more often than any other shortcut since I am usually making presentations or Dashboards

To handle paste-specials such as Values or Formulas, I take advantage of the Quick Access Toolbar (putting it underneath formula bar) by removing the defaults and putting some custom buttons there, of which I use Paste Values and Paste Formulas very often with just a single click

Holding CTRL and then pressing the arrow keys moves the selection to the next break in the data.
Hold down CTRL+SHIFT and use the arrow keys and you can very quickly highlight large areas of data for editing.
Once you have selected the range: CTRL+D will ‘Drop’ the contents or formula from the first row of cells into all the cells below. Very handy when adding formulars to large spreadsheets. Much quicker than dragging over 1000s of rows.

I am revealing some of the MOST IGNORED shortcuts which are very powerful and useful here. In fact, Very few people use them.

1. Shift+Enter:
When you have some range of cells with gaps in the data, you cannot use the keyboard shortcut Ctrl+Shift+Down Arrow or Ctrl+Shift+Up Arrow, you cannot select them all at a go, because it will stop you before the next blank cell. If the data in question is in D2:D12000 with some gaps in between and we want to select whole range, here is the method: 1)Keep the cursor at D2, 2) Go to the Namebox, type D12000 (you should know about the data range prior), press Shift+Enter. That’s it, it goes down as an express elevator with out even stopping at any blank cells. It’s already selected. And now you can do whatever you want with it i.e. building formula or applying some formats or colors etc.

2. Ctrl+. :
When you deal with large range of cells, may be thousands of rows deep down, especially when you build formulas, you want to check whether you are building the formula in the right column after selecting thousands of rows down, because you cannot see the column header. Then the only option is to disturb the entire selection and going to the top cell of that column to see the column header to make sure where to build the formula. Then again you have to select the whole range. To avoid this confusion, you can use ” Ctrl+. “. Just select a whole range of cells and press this shortcut to see what happens. It will change the Active cell of the selection. This indirectly lets you know the column headers as well. In some formulas giving the correct cell reference of the Active cell is very important. Then this shortcut is very useful.
These two are my favorite shortcuts which very few people know about and use them.

A recent shortcut I’ve found really helpful is Ctrl and Tab, flicks through workbooks in the same fashion as Alt and Tab flicks through program’s. extremely handy for the amount of workbooks I work with.

For fellow Mac users it should be Alt and Tab but if not try Ctrl and Tab ive bled my MacBooks battery dry so need to wait for power.

A recent shortcut I’ve found really helpful is Ctrl and Tab, flicks through workbooks in the same fashion as Alt and Tab flicks through program’s. extremely handy for the amount of workbooks I work with.
For fellow Mac users it should be Alt and Tab but if not try Ctrl and Tab ive bled my MacBooks battery dry so need to wait for power.

When typing a formula, excel offers a list of functions matching the letters being typed. You can then arrow down the list to the function wanted; but is there a keyboard shortcut to pasting the function into the formula, or does one have to use the mouse?