Excel functions
Excel function reference
30 of the Excel functions people use most, each with its syntax, the versions that have it, how Google Sheets differs, worked examples on a small sheet, and fixes for the errors you'll actually see.
Last reviewed
Lookup
Find a value in a table and return a matching value or its position.
- XLOOKUPFinds a value in one column or row and returns the matching value from another, in any direction.Syntax and examples
- VLOOKUPLooks up a value in the first column of a table and returns a value from a column to its right.Syntax and examples
- HLOOKUPLooks up a value in the top row of a table and returns a value from a row below it.Syntax and examples
- INDEXReturns the value at a given row and column position inside a range.Syntax and examples
- MATCHReturns the position of a value in a column or row.Syntax and examples
- XMATCHReturns the position of a value, with exact match by default and search from the end.Syntax and examples
Conditional math
Sum, count and average only the rows that meet your conditions.
- SUMIFSAdds up the numbers in a range that meet one or more conditions.Syntax and examples
- COUNTIFSCounts the rows that meet one or more conditions.Syntax and examples
- AVERAGEIFSAverages the numbers in a range that meet one or more conditions.Syntax and examples
- SUMPRODUCTMultiplies ranges row by row and adds up the results; also does conditional sums and counts.Syntax and examples
Logic
Make decisions in a formula, catch errors, and name or reuse calculations.
- IFReturns one value when a test is true and another when it's false.Syntax and examples
- IFSChecks several conditions in order and returns the value for the first one that's true.Syntax and examples
- IFERRORReturns a value you choose when a formula returns an error.Syntax and examples
- LETNames values inside a formula so you calculate them once and reuse them.Syntax and examples
- LAMBDATurns a formula into a reusable custom function with its own parameters.Syntax and examples
Dynamic arrays
Formulas that spill a live list: filter, sort, de-duplicate and generate.
- FILTERReturns the rows of a range that meet your conditions, as a live list.Syntax and examples
- SORTReturns a sorted copy of a range by one or more of its columns.Syntax and examples
- SORTBYSorts a range by the values in other ranges, which don't have to be returned.Syntax and examples
- UNIQUEReturns the distinct values in a range, or the ones that appear only once.Syntax and examples
- SEQUENCEGenerates a list or grid of sequential numbers or dates.Syntax and examples
Text
Split, join, extract and clean up text.
- TEXTSPLITSplits text into columns, rows or both at the delimiters you choose.Syntax and examples
- TEXTJOINJoins text from cells or ranges with a delimiter, optionally skipping blanks.Syntax and examples
- CONCATJoins text from cells or ranges into one string, with no delimiter.Syntax and examples
- LEFT, RIGHT and MIDTake characters from the start, end or middle of a text string.Syntax and examples
- TRIMRemoves extra spaces from text, leaving single spaces between words.Syntax and examples
Dates
Count the time between dates, find month ends and count working days.
Summaries
Group and pivot data into summary tables with a single formula.
Not sure which function you need?
Upload your spreadsheet to Chat and describe the result you want, or use the Formula Generator. Free plan, no credit card.
Start free