Function guides
What each function does, how to write it, and a live example you can edit. They work the same in Excel and Google Sheets unless the guide says otherwise.
Maths
- AVERAGEAVERAGE works out the mean of a range of numbers, such as your daily step count over a week.
- AVERAGEIFAVERAGEIF averages only the rows that meet a condition, such as the mean delivery time for one courier.
- MAXMAX finds the largest number in a range, such as the wettest month of the year.
- MINMIN returns the smallest number in a range, such as the cheapest fuel price on your route.
- ROUNDROUND rounds a number to a set number of decimal places, such as VAT to the nearest penny.
- ROUNDDOWNROUNDDOWN always rounds a number down, toward zero, such as how many tickets a budget can buy.
- ROUNDUPROUNDUP always rounds a number up, away from zero, such as working out how many boxes an order needs.
- SUMSUM adds up numbers, cells and whole ranges in one go, like a week of café takings.
- SUMIFSUMIF adds up the numbers in a range that meet one condition.
- SUMIFSSUMIFS adds up the numbers that meet several conditions at once, such as laptop sales in the North region.
- SUMPRODUCTSUMPRODUCT multiplies matching rows and adds the results in one formula, such as an order total from quantities and prices.
Counting
- COUNTCOUNT tells you how many cells in a range contain numbers, such as how many pupils have a test score.
- COUNTACOUNTA counts every cell that isn't empty, text and numbers alike, such as how many people are on a sign-up list.
- COUNTBLANKCOUNTBLANK counts the empty cells in a range, such as tasks without a completion date.
- COUNTIFCOUNTIF counts the cells that meet one condition, such as volunteers at one branch or shifts over 5 hours.
- COUNTIFSCOUNTIFS counts rows that meet several conditions at once, such as monthly gym members with 10+ visits.
Lookup
- HLOOKUPHLOOKUP searches the top row of a table and returns a value from a row below it, such as a price for a clothing size.
- INDEXINDEX returns the value at a given row and column of a range, such as a ticket price from a price grid.
- MATCHMATCH returns the position of a value in a row or column, such as where a team sits in a league table.
- VLOOKUPVLOOKUP finds a value in the first column of a table and returns a matching cell, such as a price from a product code.
- XLOOKUPXLOOKUP finds a value in one column and returns the matching item from another, left or right, such as a phone extension from a name.
Logic
- ANDAND returns TRUE only when every condition you give it is true, such as checking an applicant has both the experience and a licence.
- IFIF tests a condition and returns one value when it's true and another when it's false, such as flagging an overspent budget.
- IFERRORIFERROR shows your own value instead of an error such as #DIV/0! or #N/A, for example when a campaign has no clicks yet.
- IFNAIFNA replaces only the #N/A error with your own value, such as "Not covered" when a lookup can't find a postcode.
- IFSIFS checks several conditions in order and returns the result for the first one that's true, such as turning marks into grades.
- NOTNOT flips TRUE to FALSE and FALSE to TRUE, such as turning a "booked" column into an "available" one.
- OROR returns TRUE when at least one condition is true, such as free delivery for orders over £40 or for members.
- SWITCHSWITCH compares one value against a list and returns the matching result, such as turning delivery codes into delivery times.
Text
- CONCATCONCAT joins text from several cells or a whole range into one, such as a first name and surname into a full name.
- FINDFIND returns the position of one piece of text inside another, such as the @ in an email address.
- LEFTLEFT returns the first few characters of a cell, such as a depot code at the start of a product code.
- LENLEN counts the characters in a cell, spaces included, which helps you spot stray spaces in postcodes.
- LOWERLOWER converts text to small letters, handy for tidying email addresses or building usernames from names.
- MIDMID pulls characters from the middle of a cell, such as the month inside a booking reference.
- PROPERPROPER capitalises the first letter of each word, turning SARAH O'CONNOR into Sarah O'Connor.
- RIGHTRIGHT returns the last few characters of a cell, such as the number at the end of an invoice reference.
- SEARCHSEARCH finds where a word appears in a cell, ignoring upper and lower case, such as spotting oak in product names.
- SUBSTITUTESUBSTITUTE swaps one piece of text for another inside a cell, such as removing the spaces from phone numbers.
- TEXTTEXT formats a number or date as text with a format code, such as Friday 14 March 2025 inside a sentence.
- TEXTAFTERTEXTAFTER returns the text after a marker such as a space or @, like the domain from an email or the surname from a full name.
- TEXTBEFORETEXTBEFORE returns the text before a marker such as a space, comma or @, like the first name from a full name.
- TEXTJOINTEXTJOIN joins a range of cells with a separator such as a comma, skipping blanks, so a list of names becomes one line.
- TEXTSPLITTEXTSPLIT splits one cell at a marker such as a comma, spilling the pieces across columns or rows.
- TRIMTRIM removes extra spaces from text, at both ends and doubled up in the middle, so Leeds and " Leeds " finally match.
- UPPERUPPER converts text to capital letters, so postcodes and codes typed in lower case all match.
Dates
- DATEDATE builds a real date from a year, month and day, such as joining three imported columns into one date you can sort and count.
- DATEDIFDATEDIF counts the whole years, months or days between two dates, ideal for length of service or someone's age.
- DAYDAY returns the day of the month from a date, from 1 to 31, useful for payday checks or finding how many days a month has.
- DAYSDAYS counts the days between two dates, such as how long a hire or a library loan lasted.
- EDATEEDATE moves a date forward or back by whole months, such as a contract renewal 12 months after it starts or a six-month review.
- EOMONTHEOMONTH returns the last day of a month, months ahead or behind, such as the due date for an invoice payable at the end of next month.
- MONTHMONTH returns the month of a date as a number from 1 to 12, ready for grouping sales by month or working out the quarter.
- NETWORKDAYSNETWORKDAYS counts the working days between two dates, skipping weekends and any bank holidays you list.
- TODAYTODAY returns the current date and updates every day, so you can count the days left until an invoice is due.
- WORKDAYWORKDAY returns the date a number of working days away, skipping weekends and bank holidays, such as a delivery date three days after an order.
- YEARYEAR returns the four-digit year from a date, so you can group orders by year or count how long someone has been a member.
Dynamic arrays
- FILTERFILTER returns only the rows that meet your conditions, such as every North region order over £100, as a live spilled list.
- SORTSORT returns a sorted copy of a range by any column, such as a sales table ranked from highest to lowest, and updates live.
- UNIQUEUNIQUE lists each different value in a range once, such as every town that has placed an order, and spills the list down.
Statistics
- LARGELARGE returns the kth biggest number in a range, such as the second-highest sales figure on a team.
- MEDIANMEDIAN finds the middle value of a set of numbers, such as a typical house price on a street with one mansion.
- RANKRANK gives a number's position in a list, highest first or lowest first, such as placing teams in a pub quiz.
- SMALLSMALL returns the kth smallest number in a range, such as the second-fastest 5k time in a running club.