Formula Library

Browse 50+ common spreadsheet formulas with examples and explanations.

SUM

beginner

Add up a range of numbers

=SUM(A1:A100)
Math

AVERAGE

beginner

Calculate the average of a range

=AVERAGE(B1:B50)
Statistical

IF

beginner

Return different values based on a condition

=IF(A1>100,"Yes","No")
Logic

VLOOKUP

intermediate

Look up a value in a table by matching the first column

=VLOOKUP(A1,Sheet2!A:D,3,FALSE)
Lookup

SUMIF

beginner

Sum values that meet a single condition

=SUMIF(A1:A100,"Completed",B1:B100)
Math

COUNTIF

beginner

Count cells that meet a condition

=COUNTIF(A1:A100,"Yes")
Statistical

INDEX/MATCH

advanced

Flexible lookup - more powerful than VLOOKUP

=INDEX(C1:C100,MATCH(E1,A1:A100,0))
Lookup

CONCATENATE / TEXTJOIN

beginner

Join text from multiple cells

=TEXTJOIN(" ",TRUE,A1,B1,C1)
Text

SUMIFS

intermediate

Sum values meeting multiple conditions

=SUMIFS(C1:C100,A1:A100,"East",B1:B100,">1000")
Math

COUNTIFS

intermediate

Count cells meeting multiple conditions

=COUNTIFS(A1:A100,"Active",B1:B100,">30")
Statistical

LEFT / RIGHT / MID

beginner

Extract part of a text string

=LEFT(A1,3)
Text

IFS

intermediate

Check multiple conditions (cleaner than nested IF)

=IFS(A1>=90,"A",A1>=80,"B",A1>=70,"C",TRUE,"F")
Logic

XLOOKUP

intermediate

Modern replacement for VLOOKUP (Excel 365)

=XLOOKUP(E1,A1:A100,C1:C100,"Not Found")
Lookup

TODAY / NOW

beginner

Get current date or date/time

=TODAY()
Date

DATEDIF

intermediate

Calculate difference between two dates

=DATEDIF(A1,B1,"D")
Date

ROUND

beginner

Round a number to specified decimal places

=ROUND(A1,2)
Math

MAX / MIN

beginner

Find the largest or smallest value in a range

=MAX(A1:A100)
Statistical

LEN

beginner

Count the number of characters in text

=LEN(A1)
Text

TRIM

beginner

Remove extra spaces from text

=TRIM(A1)
Text

IFERROR

beginner

Show a custom value instead of an error

=IFERROR(A1/B1,"N/A")
Logic

AVERAGEIF

intermediate

Average values meeting a condition

=AVERAGEIF(A1:A100,"East",B1:B100)
Statistical

UNIQUE

intermediate

Return unique values from a range

=UNIQUE(A1:A100)
Statistical

FILTER

advanced

Return rows matching criteria (dynamic filter)

=FILTER(A1:D100,B1:B100>50)
Lookup

SORT

intermediate

Sort a range dynamically

=SORT(A1:D100,2,-1)
Lookup

TEXT

intermediate

Format a number as text with a specific format

=TEXT(A1,"$#,##0.00")
Text

UPPER / LOWER / PROPER

beginner

Change text case

=PROPER(A1)
Text

SUBSTITUTE

beginner

Replace specific text within a string

=SUBSTITUTE(A1,"old","new")
Text

HLOOKUP

intermediate

Horizontal lookup - search across a row

=HLOOKUP("Q1",A1:D2,2,FALSE)
Lookup

AND / OR

intermediate

Check if multiple conditions are true

=IF(AND(A1>50,B1="Active"),"Yes","No")
Logic

RANK

intermediate

Rank a value within a range

=RANK(A1,$A$1:$A$100,0)
Statistical

MEDIAN

beginner

Find the middle value of a dataset

=MEDIAN(A1:A100)
Statistical

STDEV

advanced

Calculate standard deviation

=STDEV(A1:A100)
Statistical

NETWORKDAYS

intermediate

Count business days between two dates

=NETWORKDAYS(A1,B1)
Date

EDATE

beginner

Add or subtract months from a date

=EDATE(A1,3)
Date

YEAR / MONTH / DAY

beginner

Extract year, month, or day from a date

=YEAR(A1)
Date

PMT

advanced

Calculate loan payment amount

=PMT(0.05/12,360,250000)
Financial

FV

advanced

Calculate future value of an investment

=FV(0.07/12,120,-500)
Financial

PERCENTILE

intermediate

Find the value at a given percentile

=PERCENTILE(A1:A100,0.9)
Statistical

INDIRECT

advanced

Reference a cell using a text string

=INDIRECT("A"&B1)
Lookup

SEARCH / FIND

intermediate

Find the position of text within a string

=SEARCH("word",A1)
Text

COUNTA

beginner

Count non-empty cells in a range

=COUNTA(A1:A100)
Statistical

ARRAYFORMULA

advanced

Apply a formula to an entire column (Google Sheets)

=ARRAYFORMULA(A1:A100*B1:B100)Sheets
Math

QUERY

advanced

SQL-like queries on spreadsheet data (Google Sheets)

=QUERY(A1:D100,"SELECT A,C WHERE B>50 ORDER BY C DESC")Sheets
Lookup

IMPORTRANGE

intermediate

Import data from another Google Sheet

=IMPORTRANGE("spreadsheet_url","Sheet1!A1:D100")Sheets
Lookup

CHOOSE

intermediate

Return value based on index number

=CHOOSE(A1,"Jan","Feb","Mar","Apr")
Logic

SWITCH

intermediate

Match value against list of cases

=SWITCH(A1,"A","Excellent","B","Good","C","Fair","Unknown")
Logic

OFFSET

advanced

Reference a cell offset from a starting point

=OFFSET(A1,5,2)
Lookup

PRODUCT

beginner

Multiply all numbers in a range

=PRODUCT(A1:A10)
Math

ABS

beginner

Return absolute (positive) value of a number

=ABS(A1)
Math

SPARKLINE

intermediate

Create inline mini chart (Google Sheets)

=SPARKLINE(A1:L1,{"charttype","line"})Sheets
Statistical