Keyboard shortcuts, core formulas, and analysis-tool reference for Microsoft Excel.
| Category | Version | Function | Syntax | Example | Notes |
|---|---|---|---|---|---|
| Lookup | 365 / 2021+ | XLOOKUP | XLOOKUP(lookup, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]) | =XLOOKUP(A2,Staff[ID],Staff[Name],"Not found") | The one to learn. Searches any direction, no column counting, built-in not-found handling, defaults to exact match. Replaces VLOOKUP, HLOOKUP, and most INDEX/MATCH. |
| Lookup | All | INDEX + MATCH | INDEX(return_range, MATCH(lookup, lookup_range, 0)) | =INDEX(C:C,MATCH(A2,B:B,0)) | The pre-XLOOKUP standard. Still needed for backward compatibility with Excel 2019 and earlier. The 0 forces exact match — omitting it is a classic silent-bug source. |
| Lookup | All | VLOOKUP | VLOOKUP(lookup, table, col_index, [range_lookup]) | =VLOOKUP(A2,$D$2:$F$99,3,FALSE) | Legacy. Always pass FALSE — the default TRUE does approximate matching and returns wrong answers silently. Breaks whenever a column is inserted. Prefer XLOOKUP. |
| Lookup | 365 / 2021+ | XMATCH | XMATCH(lookup, lookup_array, [match_mode], [search_mode]) | =XMATCH("Q3",A1:L1) | Returns a position rather than a value. Supports reverse search (-1) to find the last match instead of the first. |
| Dynamic Array | 365 / 2021+ | FILTER | FILTER(array, include, [if_empty]) | =FILTER(A2:D99,(C2:C99="West")*(D2:D99>1000),"None") | Returns every matching row, spilling automatically. Multiply conditions for AND, add them for OR. Replaces most advanced-filter and helper-column work. |
| Dynamic Array | 365 / 2021+ | UNIQUE | UNIQUE(array, [by_col], [exactly_once]) | =SORT(UNIQUE(B2:B500)) | Distinct values, live-updating. The example is the standard recipe for building a clean dropdown source list. |
| Dynamic Array | 365 / 2021+ | SORT / SORTBY | SORT(array,[index],[order]) | =SORTBY(A2:C50,C2:C50,-1) | Sorts without touching the source data. -1 is descending. SORTBY sorts by a column that need not be in the output. |
| Dynamic Array | 365 | SEQUENCE | SEQUENCE(rows,[cols],[start],[step]) | =SEQUENCE(12,1,DATE(2026,1,1),1) | Generates a spilled number series. Combined with DATE it builds calendar scaffolding with no dragging. |
| Dynamic Array | 365 | TEXTSPLIT | TEXTSPLIT(text, col_delim, [row_delim]) | =TEXTSPLIT(A2,",") | Formula-based Text-to-Columns that updates live. Companions: TEXTBEFORE, TEXTAFTER. |
| Dynamic Array | 365 | LAMBDA / LET | LET(name,value,...,calculation) | =LET(r,FILTER(A:A,B:B="X"),IF(COUNT(r)=0,0,AVERAGE(r))) | LET names intermediate results — faster and far more readable than repeating a subexpression. LAMBDA lets you define reusable custom functions with no VBA. |
| Aggregate | All | SUMIFS / COUNTIFS / AVERAGEIFS | SUMIFS(sum_range, crit_range1, crit1, ...) | =SUMIFS(D:D,B:B,"West",C:C,">="&DATE(2026,1,1)) | Multi-condition aggregation. Note the ">="& pattern for comparing against a date or cell — a very common stumbling block. |
| Aggregate | All | SUMPRODUCT | SUMPRODUCT(array1,[array2],...) | =SUMPRODUCT((B2:B99="West")*(D2:D99)) | The pre-dynamic-array workhorse for conditional math. Still the cleanest way to do weighted totals in one step. |
| Aggregate | All | SUBTOTAL | SUBTOTAL(function_num, ref) | =SUBTOTAL(109,D2:D99) | 109 = SUM ignoring hidden/filtered rows (101–111 ignore them; 1–11 don't). The right total to show above a filtered table. |
| Aggregate | All | COUNTA / COUNTBLANK | COUNTA(range) | =COUNTA(A2:A999) | COUNT counts numbers only; COUNTA counts anything non-empty. A formula returning "" still counts as non-empty to COUNTA. |
| Logic | All | IF | IF(condition, if_true, if_false) | =IF(D2>=1000,"Priority","Standard") | Nesting more than three deep is a signal to switch to IFS, XLOOKUP against a mapping table, or a helper column. |
| Logic | 2019+ | IFS / SWITCH | IFS(test1,val1,test2,val2,...) | =IFS(A2>90,"A",A2>80,"B",A2>70,"C",TRUE,"F") | Flat alternative to nested IFs. End with TRUE,default or unmatched values return #N/A. |
| Logic | All | IFERROR / IFNA | IFERROR(value, value_if_error) | =IFERROR(A2/B2,0) | Use IFNA when you only want to catch failed lookups — IFERROR also swallows genuine mistakes like #REF! and #VALUE!, hiding real bugs. |
| Text | 2019+ | TEXTJOIN | TEXTJOIN(delim, ignore_empty, range) | =TEXTJOIN(", ",TRUE,A2:A20) | Joins a range with a separator, skipping blanks. Far better than chained & concatenation. |
| Text | All | TEXT | TEXT(value, format_code) | =TEXT(A2,"yyyy-mm-dd") | Formats a number/date as text. Essential when building labels — the result no longer sorts or calculates as a number. |
| Text | All | TRIM / CLEAN | TRIM(text) | =TRIM(CLEAN(A2)) | First aid for pasted data. TRIM removes extra spaces; CLEAN strips non-printing characters. Note TRIM won't remove non-breaking spaces (CHAR 160) from web pastes — use SUBSTITUTE(A2,CHAR(160)," "). |
| Text | All | SUBSTITUTE | SUBSTITUTE(text, old, new, [instance]) | =SUBSTITUTE(A2,"-","") | Replaces by matched text. REPLACE replaces by position instead — different tools, commonly confused. |
| Date | All | EOMONTH | EOMONTH(start, months) | =EOMONTH(TODAY(),0) | Last day of a month N months out. EOMONTH(d,-1)+1 is the idiomatic "first day of this month". |
| Date | All | NETWORKDAYS.INTL | NETWORKDAYS.INTL(start,end,[weekend],[holidays]) | =NETWORKDAYS.INTL(A2,B2,1,Holidays) | Working days between dates, with a configurable weekend and a holiday exclusion list. The correct tool for SLA and delivery calculations. |
| Date | All | DATEDIF | DATEDIF(start,end,"unit") | =DATEDIF(A2,TODAY(),"y") | Undocumented but functional legacy function for age/tenure. Units: "y", "m", "d", "ym", "md". Won't autocomplete — type it in full. |
| Group | Action | Windows | Mac | Why it matters |
|---|---|---|---|---|
| Navigate | Jump to edge of data | Ctrl + Arrow | ⌘ + Arrow | The single most useful navigation key. Instantly finds the last row of a 50,000-row table — and reveals accidental gaps in your data. |
| Navigate | Select to edge of data | Ctrl + Shift + Arrow | ⌘ + Shift + Arrow | Selects an entire column/row of data without touching the mouse or grabbing empty cells below. |
| Navigate | Go to A1 | Ctrl + Home | Fn + Ctrl + ← | Instant reset when lost in a large sheet. |
| Navigate | Next / previous worksheet | Ctrl + PgDn / PgUp | Fn + Ctrl + ↓ / ↑ | Tab through a multi-sheet workbook without aiming at tiny tabs. |
| Navigate | Go To Special | Ctrl + G then Alt+S | Fn + F5 | Select all blanks, all formulas, or all constants at once. The hidden power tool for auditing and cleaning a sheet. |
| Entry | Fill down / right | Ctrl + D / Ctrl + R | ⌘ + D / ⌘ + R | Copies from the cell above/left into the whole selection. Faster and more precise than dragging a fill handle. |
| Entry | Fill entire selection | Ctrl + Enter | ⌃ + Enter | Select a range, type once, press this — fills every selected cell at once. Pairs perfectly with Go To Special → Blanks. |
| Entry | Flash Fill | Ctrl + E | ⌘ + E | Type one example of the pattern you want, press it, and Excel infers the rest. Splits names or reformats phone numbers with zero formulas. |
| Entry | Insert today's date / time | Ctrl + ; / Ctrl + Shift + ; | ⌘ + ; | Inserts a static value, unlike TODAY() which changes every day. Usually what you actually want in a log. |
| Entry | Toggle absolute reference | F4 | ⌘ + T | Cycles A1 → $A$1 → A$1 → $A1 while editing. Press repeatedly to reach the mix you need. |
| Entry | Repeat last action | F4 (outside edit mode) | ⌘ + Y | Repeats your last formatting or insert. Applying the same fill to twelve scattered cells becomes trivial. |
| Format | Format Cells dialog | Ctrl + 1 | ⌘ + 1 | The gateway to number formats, custom formats, borders, and alignment. Worth committing to memory. |
| Format | Create Table | Ctrl + T | ⌘ + T | Converts a range into a real Table — structured references, auto-expanding formulas, banded rows. See the Patterns tab for why this matters so much. |
| Format | Toggle filters | Ctrl + Shift + L | ⌘ + Shift + F | Adds/removes filter dropdowns on the header row instantly. |
| Format | Paste Special | Ctrl + Alt + V | ⌘ + ⌃ + V | Paste values only, formats only, or transpose. "Paste values" is the fix for a formula that breaks the moment it's copied elsewhere. |
| Format | Insert / delete row | Ctrl + Shift + + / Ctrl + - | ⌘ + Shift + + / ⌘ + - | Operates on whatever is selected — select the whole row first for a clean insert. |
| Formula | AutoSum | Alt + = | ⌘ + Shift + T | Guesses the range above and inserts SUM. Check the guess before accepting. |
| Formula | Show all formulas | Ctrl + ` | ⌃ + ` | Reveals every formula as text at once. The fastest way to audit an unfamiliar workbook or spot a hardcoded number hiding among formulas. |
| Formula | Evaluate part of a formula | F9 (with fragment selected) | Fn + F9 | Select a sub-expression inside a formula and see what it evaluates to. Press Esc, not Enter, or you'll hardcode the result. |
| Formula | Recalculate all | Ctrl + Alt + F9 | ⌘ + ⌥ + F9 | Forces a full rebuild when a workbook is on manual calculation or a value looks stale. |
Convert the source to a Table first
Click inside the data → Ctrl + T → confirm "My table has headers". Then rename it in the Table Design tab (e.g. SalesData). A Table grows automatically as rows are added, so the Pivot's source range never needs updating again.
Clean the headers before you pivot
Every column needs a unique, non-blank header. Merged cells in the header row break PivotTables outright. One header row only — no stacked "title" rows above the data.
Insert the PivotTable
Insert → PivotTable → the source shows your Table name rather than a cell range. Put it on a new worksheet unless you have a specific reason not to.
Drag fields into the four zones
Rows = what you're grouping by. Columns = a second breakdown (use sparingly; wide pivots get unreadable fast). Values = the numbers being aggregated. Filters = a top-level slicer for the whole table.
Fix the aggregation — it defaults to Count more often than you'd think
If a Values field shows "Count of Amount" instead of "Sum of Amount", there's a text value or a blank hiding in that column. Click the field → Value Field Settings → Sum. But go find the bad cell too: it means your data has a type problem.
Add Slicers instead of teaching people the filter menus
PivotTable Analyze → Insert Slicer. Slicers are big clickable filter buttons, and one slicer can drive several PivotTables at once via Report Connections — the foundation of a usable dashboard.
Refresh is manual — this surprises everyone
PivotTables don't update live. Alt + F5 refreshes one, Ctrl+Alt+F5 refreshes all. To automate: right-click → PivotTable Options → Data → Refresh data when opening the file.
Power Query — the tool most Excel users never open
Data → Get Data → choose your source
From File (Excel/CSV/JSON), From Folder (combines every file in it), From Web, or From Database. "From Folder" is the standout: point it at a folder of monthly exports and it stacks them all into one table automatically.
Transform in the editor, watching Applied Steps
Every click is recorded in the Applied Steps panel on the right. Remove columns, split, filter, replace values, set data types. Steps can be reordered, edited, or deleted later — this is version-controlled cleanup rather than destructive edits.
Set data types explicitly, early
Don't rely on inference. Click each column's type icon and set it deliberately, particularly for dates and anything that looks numeric but should be text (postal codes, IDs with leading zeros).
Unpivot wide data into tidy data
Got a column per month? Select the month columns → Transform → Unpivot Columns. You get a tidy Attribute/Value pair per row, which is the shape PivotTables and charts actually want.
Close & Load To… — pick your destination deliberately
Choose Table (into a sheet) or Only Create Connection + Add to Data Model for large data. Loading a million rows into a worksheet when you only need a Pivot on top of it is the usual cause of a sluggish workbook.
Patterns that separate a robust workbook from a fragile one
Ctrl + Tconverts a range into a Table. Formulas then read=SUM(Sales[Amount])instead of=SUM(D2:D5000).- Tables auto-expand. New rows inherit formulas and formatting, and every Pivot, chart, and named range pointing at the Table picks them up automatically.
- Structured references survive column insertion — the single biggest cause of VLOOKUP breakage disappears.
- Rule of thumb: if data has headers and grows, it should be a Table. There is almost no downside.
- Keep raw data on its own sheet and never hand-edit it. Cleanup belongs in Power Query or in formulas on a separate sheet.
- Put assumptions (tax rate, FX rate, headcount) in one clearly-marked input block, and reference them. Never bury a constant inside a formula.
- Colour-code by convention: blue for hardcoded inputs, black for formulas. This is standard practice in financial modelling for a reason — it makes "what can I safely change?" visible at a glance.
- Output/presentation sheets should contain almost no logic — just references to the calculation layer.
- Data → Data Validation → List, sourced from a
UNIQUE()spill range or a named Table column, so the dropdown maintains itself. - Validation also enforces number ranges, date bounds, and text length — cheaper than cleaning bad entries later.
- Protect the sheet (Review → Protect Sheet) leaving only input cells unlocked, so formulas can't be overwritten by accident.
- Conditional Formatting to flag anomalies: duplicates, negatives where impossible, dates in the future.
- Avoid whole-column references (
A:A) in heavy formulas — they force Excel to consider a million rows. Use Table references instead. - Volatile functions (
NOW,TODAY,RAND,OFFSET,INDIRECT) recalculate on every change. A few are fine; hundreds will crawl. - Use
LETto compute a subexpression once instead of repeating it four times in the same formula. - For very large datasets, load to the Data Model (Power Pivot) rather than into worksheet cells.
Error codes and what they actually mean
#N/A
The lookup value genuinely isn't there. Usual culprits: trailing spaces (wrap in TRIM), or a number stored as text vs. a real number. Wrap in IFNA once you've confirmed it's expected.
#VALUE!
Arithmetic on text. Often an invisible space or a non-breaking space from a web paste. Check with =ISNUMBER(A2).
#REF!
A row/column the formula depended on was deleted. Unrecoverable by formula — undo immediately if it just happened. Never mask this one with IFERROR.
#DIV/0!
Denominator is zero or blank. =IFERROR(A2/B2,0) is fine if zero is genuinely the right answer for an empty denominator.
#SPILL!
A dynamic array can't expand because something is in the way. Clear the cells below/right of the formula. Merged cells are a frequent hidden cause.
#NAME?
Misspelled function, or a newer function used in an older Excel version. XLOOKUP in Excel 2019 produces exactly this.
Prepare the Excel data source properly — this is where merges go wrong
One header row at the very top, one record per row, no blank rows and no merged cells. Header names become your merge fields, so name them clearly (FirstName, not Column1). Keep everything on the first worksheet, or note which sheet to pick later.
Start the merge in Word
Word → Mailings tab → Start Mail Merge → choose Letters, E-mail Messages, Envelopes, Labels, or Directory. Directory is the overlooked one: it produces a single continuous list rather than one page per record — ideal for a printed roster or catalogue.
Connect the spreadsheet
Mailings → Select Recipients → Use an Existing List → pick your .xlsx → choose the worksheet. Then Edit Recipient List lets you filter, sort, or deselect rows without touching the original file — the right place to exclude test rows or send to one region only.
Insert the merge fields
Write the letter normally, and use Mailings → Insert Merge Field wherever a value belongs. Preview Results then shows real data, and the arrows step through records — always check the first, last, and one awkward middle record before sending.
Fix the number and date formatting — the classic mail-merge failure
Word ignores Excel's cell formatting and pulls the raw value, so 1250.5 arrives as "1250.5" and a date as "3/1/2026 00:00:00". The fix is a field switch. Press Alt + F9 to reveal field codes, edit them directly, then Alt + F9 again and F9 to refresh.
Add conditional content with Rules
Mailings → Rules → If…Then…Else inserts logic into the template. Use it to vary a sentence by region, add a late-payment line only when relevant, or handle a missing field gracefully. Skip Record If excludes rows without pre-filtering the data.
Finish & Merge
Edit Individual Documents produces one long Word file you can proofread before printing — always do this for anything going to print. Print Documents goes straight to the printer. Send E-mail Messages hands off to Outlook: pick the email column, set the subject, and choose HTML format.
Know the email-merge limitations before you rely on it
Native email merge cannot attach files, cannot CC/BCC, and sends immediately with no preview of the outbound queue. It requires the desktop Outlook set as your default mail client — it will not work from Outlook on the web. Messages land in Sent as normal. For attachments or scheduling you need a VBA macro or a third-party add-in.
Mail merge troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Numbers show as 1250.5 or 0.075 | Word reads the underlying value, not Excel's display format. | Add a numeric picture switch: \# "$#,##0.00" or \# "0.0%" via Alt+F9. |
| Dates appear as 3/1/2026 0:00:00 | Same issue — the raw date-time serial is being rendered. | Add \@ "d MMMM yyyy", or connect via DDE (see below). |
| Fields show «FirstName» in the output | Preview Results is off, or the field never resolved. | Toggle Preview Results. If still literal, the data source connection was lost — reconnect via Select Recipients. |
| Only the first record merges | Merged to a single document instead of iterating, or a blank row terminated the recordset. | Remove blank rows from the Excel sheet and re-select the recipient list. |
| Leading zeros vanish from ZIP codes / IDs | Excel stored them as numbers. | Format the Excel column as Text before entering data, or use \# "00000" in the merge field. |
| Blank line where an empty field sits | Address Line 2 is empty but its paragraph still renders. | Wrap it in an IF rule so the whole line only appears when the field has content. |
| Email merge greyed out | Desktop Outlook isn't installed or isn't the default mail client. | Set Outlook as default in Windows Settings → Apps → Default apps. Outlook on the web cannot drive a merge. |
| Need attachments on merged emails | Not supported natively — a genuine product limitation. | Use a VBA macro driving Outlook's object model, or a dedicated add-in. Don't spend time hunting for a built-in option. |
- Word → File → Options → Advanced → General → tick "Confirm file format conversion on open".
- Now when you Select Recipients, Word offers connection methods. Choose MS Excel Worksheets via DDE.
- DDE reads Excel's formatted values, so currency, percentages, and dates arrive already looking correct — no picture switches needed at all.
- Trade-off: DDE requires Excel to actually open the file during the merge and is slower on very large datasets. For a few thousand rows it's the pragmatic choice.
Other cross-app features people don't know exist
Copy in Excel → in Word, Home → Paste ▾ → Paste Special → Paste Link → Microsoft Excel Worksheet Object. The Word table now updates when the spreadsheet changes. Ideal for a monthly report whose numbers keep moving right up to publication.
Paste an Excel chart into PowerPoint using Keep Source Formatting & Link Data. Refresh the deck after updating the workbook instead of rebuilding every chart before each board meeting.
Add Camera from File → Options → Quick Access Toolbar → All Commands. It creates a live picture of a cell range that updates automatically — the classic technique for assembling a dashboard from scattered sheets.
Data → What-If Analysis → Goal Seek. "What discount gets this total to exactly £10,000?" Excel works backwards and fills in the input for you. Takes ten seconds and almost nobody uses it.
Data → What-If Analysis → Data Table builds a full sensitivity grid across two changing inputs — interest rate against term, price against volume — in one step rather than hundreds of manual recalcs.
Save several complete sets of input assumptions (Best / Base / Worst) and switch between them instantly, with a comparison summary report. Far cleaner than three near-identical copies of the workbook.
Formulas → Watch Window pins chosen cells in a floating panel so you can see them update while working on a different sheet. Invaluable when a change on sheet 8 should move a total on sheet 1.
In Outlook, select text you type constantly → Insert → Quick Parts → Save Selection. Reinsert it in any future email in two keystrokes. The reusable-boilerplate feature hiding in plain sight.
Home → Quick Steps bundles several actions — move to folder, mark read, flag, forward to someone — behind one button or shortcut. The closest Outlook gets to true one-click triage.
A saved search that behaves like a folder and stays current — "everything unread from my manager", "anything with an attachment over 5 MB". Right-click Search Folders → New Search Folder.
Review → Compare produces a marked-up third document showing every difference between two versions. The correct answer to "what changed in this contract?" — much better than reading both side by side.
Native merge produces one combined file. To get one PDF per record — payslips, certificates, invoices — you need a short VBA loop or an add-in. Worth knowing before promising it to someone.
Gotchas worth knowing before they bite
- Excel stores dates as serial numbers counting from 1 Jan 1900. That's why a date can suddenly display as
45678— the value is fine, only the format changed. - Dates typed in a non-matching regional format silently import as text and won't sort or calculate.
=ISNUMBER(A2)is the quick check. - Excel deliberately contains a bug: it treats 1900 as a leap year for Lotus 1-2-3 compatibility. Irrelevant for modern dates, but it exists.
- Times are the fractional part — 0.5 is noon. Durations over 24 hours need the custom format
[h]:mmor they wrap around.
- Leading zeros vanish — postal codes and IDs become numbers. Import via Power Query and set the column to Text before loading.
- Long numeric IDs above 15 digits lose precision permanently. Excel stores 15 significant digits; a 16-digit account number gets a trailing zero and no warning.
- Anything resembling a date gets converted. This famously forced geneticists to rename genes, because
SEPT2kept becoming a date. - Never double-click a CSV to open it if the data matters. Use Data → From Text/CSV so you get the type-control dialog.
- They break sorting, filtering, PivotTables, dynamic array spilling, and most VBA.
- Use Center Across Selection (Ctrl+1 → Alignment → Horizontal) instead. Identical visual result, none of the damage.
- If you inherit a sheet full of merges: select all → Merge & Center (to unmerge) → Go To Special → Blanks → type
=and up-arrow → Ctrl+Enter to backfill.
- Real-time co-authoring requires the file on OneDrive/SharePoint and works best in .xlsx — legacy .xls blocks it entirely.
- Some features lock the file for others: certain PivotTable changes, sheet protection changes, and anything involving VBA in an .xlsm.
- Version History (File → Info → Version History) is your undo across sessions and is far more reliable than hoping for an autorecover file.
Habits that pay off
Ctrl + ` shows every formula at once. Formulas → Trace Precedents/Dependents draws arrows showing what feeds what. Do this on any workbook you inherit before relying on its numbers.
Ctrl+1 → Custom. #,##0,,"M" displays 1,250,000 as "1.3M" while keeping the real value intact for calculation. Formatting changes appearance, never the underlying number.
Select the cell below and right of what you want frozen, then View → Freeze Panes. Selecting B2 freezes row 1 and column A together — the arrangement most people actually want.
Ctrl-click several sheet tabs and every edit applies to all of them. Enormously useful for twelve identically-structured monthly tabs — and dangerous if you forget to ungroup afterwards.
Insert → Sparklines puts a tiny chart inside a single cell. A trend column beside your numbers conveys more than a separate full-size chart, at a fraction of the space.
Press and release Alt on Windows and letter hints appear over every ribbon command. Any action becomes a keyboard sequence — and unlike shortcuts, you don't have to memorize it in advance.
Official docs & further reading
# spill operator, and why #SPILL! happens.
support.microsoft.com
Excel VBA object model
For genuine automation beyond formulas and Power Query — the full VBA API reference.
learn.microsoft.com