Excel functions
Every function briefly explained, with the syntax, the pitfalls and an example you can change straight away.
Basics
Creating a formula
A formula always starts with =. Then comes a calculation with cells, such as =B2*C2, or a function, such as =SUM(B2:B6). When a number changes, Excel recalculates straight away.
Full explanationFilling and copying formulas
Drag the fill handle, the small square at the bottom right of the cell, downwards, and Excel adjusts the formula for each row: =B2*C2 becomes =B3*C3. Double-clicking it is even quicker.
Full explanationOrder of operations
Excel first works out what is in brackets, then powers, then multiplication and division, and only then addition and subtraction. With brackets you set the order yourself.
Full explanationAbsolute references ($)
A $ locks part of a reference, so it doesn't shift when you fill a formula. $A$1 always stays A1. F4 switches between the forms.
Full explanationCalculating percentages
To Excel, 20% is simply 0.2. A percentage of an amount is =amount*20%, and the amount plus 20% is =amount*(1+20%).
Full explanationWorking with multiple sheets
To use a cell on another sheet, write the sheet name, an exclamation mark and the cell: =Prices!B2. With =SUM(Jan:Mar!B2) you add up the same cell across several sheets.
Full explanationFormatting numbers
A number format changes how a number looks, for example as currency, a percentage or a date, without changing the number itself. You choose it on the Home tab or with Ctrl + 1.
Full explanationCalculating
SUM
SUM adds up whatever you select, such as =SUM(C2:C6). Text and empty cells are simply skipped.
Full explanationSubtract, multiply, divide
To subtract, multiply or divide in Excel, you don't use a function but an operator: =A2-B2, =A2*B2 and =A2/B2. Only adding has its own function, SUM.
Full explanationAVERAGE
AVERAGE gives you the average of whatever you select. An empty cell isn't counted, but a 0 is.
Full explanationMIN and MAX
MIN gives the lowest and MAX the highest value in a set of numbers.
Full explanationABS, POWER and SQRT
ABS gives a number without its minus sign, POWER raises a number to a power and SQRT gives the square root.
Full explanationCounting
COUNT and COUNTA
COUNT counts cells that contain a number. COUNTA counts every cell that isn't empty, text included.
Full explanationCOUNTIF
COUNTIF tells you how many cells match what you ask for, such as =COUNTIF(A2:A6,"Leeds").
Full explanationCOUNTIFS
COUNTIFS counts the rows that meet several conditions at once. For each condition you give a range and a value.
Full explanationSUMIF
SUMIF adds up only the rows you want: first where to look, then what to look for, then what to add up.
Full explanationSUMIFS
SUMIFS adds up with several conditions. The sum range comes first, followed by the pairs of range and criteria.
Full explanationAVERAGEIF
AVERAGEIF works out the average of only the rows that meet a condition, such as the average revenue for Leeds.
Full explanationMAXIFS and MINIFS
MAXIFS gives the highest number from only the rows that meet your conditions, such as the highest revenue for Leeds. MINIFS gives the lowest.
Full explanationWildcards
With * you look for zero or more characters and with ? for exactly one. "UK*" finds everything that starts with UK.
Full explanationLogic
TRUE and FALSE
A comparison such as =B2>100 gives TRUE or FALSE. You use that result in IF, in COUNTIF and when filtering.
Full explanationIF
With IF you let Excel choose: if the test is true, you get one result, otherwise the other. For example =IF(C2>500,"High","Low").
Full explanationIFS
IFS checks a series of conditions one after another and gives the result of the first one that's true. That way you avoid nested IF formulas.
Full explanationAND and OR
AND gives TRUE if all conditions are met. OR gives TRUE if at least one is. You usually use them inside IF.
Full explanationIFERROR
IFERROR shows a value of your own when a formula gives an error, and otherwise just the result.
Full explanationISNUMBER and ISBLANK
ISNUMBER gives TRUE if a cell contains a number, ISBLANK if it's empty. You usually use them inside IF, to check before you calculate.
Full explanationLooking things up
VLOOKUP
With VLOOKUP, Excel looks something up in a table: it finds your code on the left and reads the price or name next to it. End with FALSE for an exact match.
Full explanationHLOOKUP
HLOOKUP looks for a value in the top row of a table and gives what is in the same column below it. Handy when your data runs across, such as months.
Full explanationXLOOKUP
With XLOOKUP you point to where Excel should look and where the answer is. It works in both directions and matches exactly by default. You do need Excel 2021 or 365.
Full explanationINDEX and MATCH
MATCH tells you the position of something, and INDEX fetches what's at that position. Together they look up in any direction, in every version of Excel.
Full explanationXMATCH
XMATCH gives the position of a value in a list, like MATCH, but finds an exact match by default and can start at the bottom. Works in Excel 2021 and 365.
Full explanationText
LEFT, RIGHT and MID
LEFT and RIGHT take characters from the start or the end of a text. MID takes a piece from the middle.
Full explanationTRIM
TRIM removes spaces at the start and the end, and turns double spaces in the middle into single ones.
Full explanationLEN
LEN counts how many characters a cell contains, spaces and punctuation included.
Full explanationUPPER, LOWER and PROPER
UPPER puts text in capitals, LOWER in lower case, and PROPER gives every word a capital letter at the start.
Full explanationSEARCH and FIND
Both functions give the position of a text inside another text. SEARCH ignores upper and lower case and knows wildcards, FIND doesn't.
Full explanationJoining text
Join cells with the & sign, for example =A2&" "&B2. For long lists, use TEXTJOIN.
Full explanationSUBSTITUTE
SUBSTITUTE replaces a particular piece of text with another, everywhere it appears.
Full explanationTEXTBEFORE and TEXTAFTER
TEXTBEFORE gives everything before a delimiter and TEXTAFTER everything after it. Available in Excel 365.
Full explanationTEXTSPLIT
TEXTSPLIT splits text across columns or rows wherever a delimiter appears. One formula, and the pieces spill over automatically. Available in Excel 365 and 2024.
Full explanationTEXT
With TEXT you decide what a number or date looks like inside a text, such as =TEXT(A1,"dd/mm/yyyy").
Full explanationVALUE
VALUE turns a number stored as text back into a real number, so you can calculate with it.
Full explanationNumbers
ROUND
With ROUND you choose how many decimal places remain. Formatting only changes what you see, ROUND changes the value itself.
Full explanationCEILING and FLOOR
CEILING rounds up to a multiple, such as a quarter of an hour or a box of 6. FLOOR rounds down.
Full explanationMOD and INT
INT rounds a number down to a whole number, and MOD gives what is left after a division. Together they give a division with a remainder.
Full explanationLARGE and SMALL
LARGE gives the second, third or nth highest value. SMALL does the same from the bottom. Ideal for a top 3.
Full explanationMEDIAN and MODE
MEDIAN gives the middle value and MODE the value that appears most often. Both are less sensitive to outliers than the average.
Full explanationSEQUENCE and RANDBETWEEN
SEQUENCE makes a list of consecutive numbers in one go, such as 1 to 10. RANDBETWEEN gives a random whole number between two limits.
Full explanationPMT, PV and FV
PMT gives the payment per period on a loan, PV how much you can borrow with a fixed monthly payment, and FV what your savings are worth after a while.
Full explanationDates
DATE
DATE builds a real date from a year, a month and a day. The order is always year, month, day.
Full explanationYEAR, MONTH and DAY
YEAR, MONTH and DAY take the year, the month or the day from a date. With WEEKDAY and ISOWEEKNUM you find the day of the week and the week number.
Full explanationTODAY
TODAY gives today's date and updates automatically. The brackets stay empty.
Full explanationDATEDIF
DATEDIF works out the difference between two dates in years, months or days, such as =DATEDIF(A2,B2,"Y") for an age.
Full explanationNETWORKDAYS
NETWORKDAYS counts the working days between two dates. Weekends don't count and you add the public holidays yourself.
Full explanationCalculating with time
To Excel, a time is part of a day: 12:00 is 0.5. That's how you work out how long someone worked, with =C2-B2, and with *24 you turn it into hours, for the pay for example.
Full explanationTIME, HOUR and MINUTE
TIME builds a time from an hour, minutes and seconds. HOUR and MINUTE take those parts out again, such as the hour 17 from 17:45.
Full explanationAnalysis
Sorting and filtering
Sorting puts the whole table in a different order, filtering hides rows for a while. Click in your table and use the buttons on the Data tab.
Full explanationSUBTOTAL
SUBTOTAL only calculates with the rows that are visible after a filter. Function number 9 adds up, 1 gives the average and 3 counts filled cells.
Full explanationMaking a chart
Select your labels and numbers with their headings, and choose Insert > Charts. A line shows a trend, a column compares, a pie shows parts of a whole.
Full explanationMaking a PivotTable
A PivotTable turns a long list into a summary per group. Click in your data, choose Insert > PivotTable and drag the fields to Rows and Values.
Full explanationWorking with tables
Turn your list into an Excel table with Ctrl + T. The table grows with new rows, gets filter buttons and a total row, and your formulas use column names: =SUM(Sales[Total]).
Full explanationConditional formatting
With conditional formatting, Excel colours a cell by itself when it meets a rule, such as red below 0. When the value changes, the colour changes with it. You'll find it on the Home tab.
Full explanationWorksheet
Named ranges
Give a cell or range a name, such as Rate or Scores, and use that name in your formulas: =SUM(Scores) instead of =SUM(C2:C6). It reads more easily, and a name never shifts.
Full explanationCreating a drop-down list
With a drop-down list you pick a cell's value from a list instead of typing it. That prevents typos. You create it under Data > Data Validation > List.
Full explanationFreezing rows and columns
With Freeze Panes, your heading row or first column stays put while you scroll. You'll find it on the View tab. That way you always know what each column holds in a long list.
Full explanationPaste Special
With Paste Special you paste only what you need: the values without formulas, just the formatting, or rows and columns swapped. Press Ctrl + Alt + V after copying.
Full explanationPrinting a sheet
Check the print preview first under File > Print, or with Ctrl + P. On the Page Layout tab you choose landscape, a print area and a heading row that repeats on every page.
Full explanationText to Columns
With Data > Text to Columns you split one column into several, at every space, comma or semicolon. Handy for names or a pasted export.
Full explanationFlash Fill
Flash Fill completes a column following an example you type yourself, such as the first name from a full name. You'll find it on the Data tab, or press Ctrl + E.
Full explanationRemove Duplicates
With Data > Remove Duplicates you delete rows that appear more than once in your list. You choose which columns Excel compares.
Full explanationFind and Replace
With Home > Find & Select > Replace, or Ctrl + H, you change a word or character in every cell at once. To find without replacing, use Ctrl + F.
Full explanationModern functions
UNIQUE
UNIQUE gives a list without duplicates. You type the formula in one cell and the result spills over automatically. Available in Excel 2021 and 365.
Full explanationSORT
SORT gives a sorted copy of your data that updates itself when the source changes. Available in Excel 2021 and 365.
Full explanationFILTER
FILTER fetches every row you want to see, whereas VLOOKUP stops at the first one. You do need Excel 2021 or 365.
Full explanationSUMPRODUCT
SUMPRODUCT multiplies columns row by row and adds up the results. Handy for totals without a helper column and for weighted averages.
Full explanationCHOOSECOLS
CHOOSECOLS shows only the columns of a table that you choose, in the order you want. The result spills over and updates itself. Available in Excel 365 and 2024.
Full explanationLET
With LET you give an intermediate result a name inside your formula. Excel works it out once, and a long formula becomes easier to read. Works in Excel 2021 and 365.
Full explanationError messages
#VALUE!
#VALUE! means a formula is getting the wrong type of data, usually text where Excel expects a number.
Full explanation#N/A
#N/A means 'not available': a lookup function such as VLOOKUP can't find the value.
Full explanation#DIV/0!
#DIV/0! means you're dividing by zero or by an empty cell.
Full explanation#NAME?
#NAME? means Excel doesn't recognise something in your formula: usually a misspelt function, or text without quotation marks.
Full explanation#REF!
#REF! means a formula refers to a cell that no longer exists, usually because you deleted a row, column or sheet.
Full explanation#SPILL!
#SPILL! means a formula wants to fill more cells than are free. You'll see it with UNIQUE, SORT and FILTER.
Full explanation#NUM!
#NUM! means a calculation doesn't produce a valid number, such as the square root of a negative number or a result that's too large.
Full explanation#CALC!
#CALC! means a newer function such as FILTER returns an empty result: not a single row meets your condition.
Full explanation#####
##### isn't a real error: the column is too narrow to show the number or date. Make the column wider by double-clicking the border to the right of the column letter.
Full explanationFixing a circular reference
A circular reference is a formula that refers to its own cell, such as =SUM(B2:B6) in B6. Excel warns you and can't work out the result. Take the cell itself out of the formula.
Full explanation