We also have alarge list of example formulas, amore complete list of Excel functions, andvideo training.

If you are new to Excel formulas,see this introduction.

Note: Excel now includesDynamic Array formulas, andalmost 50 new functions.

NOW and TODAY functions

Date and Time Functions

Excel provides many functions to work withdatesandtimes.

If you want a static value, usedateandtimeshortcuts.

HOUR, MINUTE, SECOND, and TIME

Excel provides a set of parallel functions for times.

NOW and TODAY functions

DATEDIF can also be configured to get total time in “normalized” denominations, i.e.

“2 years and 6 months and 27 days”.

you’ve got the option to use theEDATEandEOMONTH functionsfor this.

NOW and TODAY functions

EDATE moves by month and retains the day.

EOMONTH works the same way, but always returns the last day of the month.

To calculate the number of workdays between two dates, you might useNETWORKDAYS.

NOW and TODAY functions

If you need more flexibility on what days are considered weekends, see theWORKDAY.INTL functionandNETWORKDAYS.INTL function.

WEEKDAY returns a number between 1-7 that indicates Sunday, Monday, Tuesday, etc.

Use theWEEKNUM functionto get the week number in a given year.

NOW and TODAY functions

However, theCONVERT functionis quite useful for everyday unit conversions.

Excel also hasISODDandISEVENfunctions that will test a number to see if it’s even or odd.

By the way, the green fill in the screenshot above is applied automatically with aconditional formattingformula.

Functions to disassemble and reassemble dates

Logical Functions

Excel’s logical functions are a key building block of many advanced formulas.

Logical functions return the boolean values TRUE or FALSE.

If you need a primer on logical formulas, this video goes through many examples.

Time function examples

In the screen below,VLOOKUPis used to retrieve cost from a menu item.

Column F contains just aVLOOKUP function, with no error handling.

Whereas IFNA only catches an #N/A error, theIFERROR functionwill catch any formula error.

DATEDIF function example

IF and IFS functions

TheIF functionis one of the most used functions in Excel.

New in Excel 2019 andExcel 365, theIFS functioncan run multiple logical tests withoutnesting IFs.

Most famous of all isVLOOKUP:

More:23 things to know about VLOOKUP.

YEARFRAC function example

LOOKUP assumes values are sorted in ascending order and always performs an approximate match.

When LOOKUP can’t find a match, it will match the next smallest value.

ROWS and COLUMNS

TheROWS functionandCOLUMNS functionprovide a count of rows in a reference.

EDATE and EOMONTH function examples

In the screen below, we are counting rows and columns in anExcel Tablenamed “Table1”.

Note ROWS returns a count of data rows in a table, excluding the header row.

By the way, here are23 things to know about Excel Tables.

WORKDAY function example

you could use theHYPERLINK functionto construct a link with a formula.

Note: TRANSPOSE is a formula and is, therefore, dynamic.

If you just need to do a one-time transpose operation, usePaste Specialinstead.

NETWORKDAYS function example

OFFSET

TheOFFSET functionis useful for all kinds of dynamic ranges.

The result is arangethat can respond dynamically to changing conditions and inputs.

This concept is a bit tricky to understand at first, but it can be useful in many situations.

WEEKDAY and WEEKNUM function examples

Below, we are using INDIRECT to get values from cell A1 in 5 different worksheets.

Each reference is dynamic.

If a sheet name changes, the reference will update.

CONVERT function example

For more details, see linked examples at the bottom of theINDIRECT function page.

Caution: both OFFSET and INDIRECT arevolatile functionsand can slow down large or complicated spreadsheets.

COUNTIF and COUNTIFS

For conditional counts, theCOUNTIF functioncan apply one criteria.

ISNUMBER ISTEXT ISLOGICAL ISBLANK ISERROR ISFORMULA

In the screen below,datais thenamed rangeC5:C13, used in all formulas.

Video:How to find the nth smallest or largest value

MINIFS, MAXIFS

TheMINIFSandMAXIFS.

RAND and RANDBETWEEN

Both theRAND functionandRANDBETWEEN functioncan generate random numbers on the fly.

AND, OR, and NOT functions

RAND creates long decimal numbers between zero and 1.

RANDBETWEEN generates random integers between two given numbers.

ROUND, ROUNDUP, ROUNDDOWN, INT

To round values up or down, use theROUND function.

IFNA function with VLOOKUP example

To force rounding up to a given number of digits, useROUNDUP.

To force rounding down, useROUNDDOWN.

To discard the decimal part of a number altogether, use theINT function.

IF function example

MROUND, CEILING, FLOOR

To round values to the nearestmultipleuse theMROUND function.

TheFLOOR functionandCEILING functionalso round to a given multiple.

FLOOR forces rounding down, and CEILING forces rounding up.

IFS function example

MOD

TheMOD functionreturns the remainder after division.

In the screen below, we are using SUMPRODUCT to count and sum orders in March.

See theSUMPRODUCT pagefor details and links to many examples.

VLOOKUP function example

(seethis pagefor the full list).

The key differences are that AGGREGATE can run more operations (19 total) and can also ignore errors.

LEN shows up in a lot of formulas that count words orcharacters.

HLOOKUP function example

To look for specific text in a cell, use theFIND functionorSEARCH function.

These functions return the numeric position of matching text, but SEARCH allows wildcards and FIND is case-sensitive.

REPLACE, SUBSTITUTE

To replace text by position, use theREPLACE function.

INDEX and MATCH function example

To replace text by matching, use theSUBSTITUTE function.

CODE, CHAR

To figure out the numeric code for a character, use theCODE function.

To translate the numeric code back to a character, use theCHAR function.

LOOKUP function example - last non-empty cell

In the example below, CODE translates each character in column B to its corresponding code.

In column F, CHAR translates the code back to a character.

To remove line breaks and other non-printing characters, useCLEAN.

ROW and COLUMN function example

TheCONCAT functionlets you concatenate (join) multiple values, including a range of values without a delimiter.

TheTEXTJOIN functiondoes the same thing, but allows you to specify a delimiter and can also ignore empty values.

Excel also provides theCONCATENATE function, but it doesn’t offer special features.

ROWS and COLUMNS function example

I wouldn’t bother with it and would insteadconcatenatedirectly with the ampersand (&) character in a formula.

EXACT

TheEXACT functionallows you to compare two text strings in a case-sensitive manner.

The text function lets you apply number formatting to numbers (including dates, times, etc.)

HYPERLINK function example

More:Detailed examples of custom number formatting.

Dynamic Array functions

Dynamic arraysare new inExcel 365, and are amajorupgrade to Excel’s formula engine.

GETPIVOTDATA function example

CHOOSE function example

TRANSPOSE function example

OFFSET function example

INDIRECT function example

COUNT and COUNTA function examples

COUNTIF and COUNTIFS function examples

SUM, SUMIFS, and SUMIFS function examples

AVERAGE, AVERAGEIF, and AVERAGEIFS function examples

MAX, MIN, LARGE, and SMALL function examples

MINIFS and MAXIFS function examples

MODE function example

RANK function example

ABS function example

RAND and RANDBETWEEN function examples

ROUND, ROUNDUP, ROUNDDOWN, INT function examples

MROUND, CEILING, FLOOR functions

MOD function example

SUMPRODUCT function example

SUBTOTAL function example

AGGREGATE function example

LEFT, RIGHT, MID function examples

LEN function example

FIND and SEARCH function examples

REPLACE and SUBSTITUTE function examples

CODE and CHAR function examples

TRIM and CLEAN function examples

CONCAT and TEXTJOIN function examples

EXACT function example

UPPER, LOWER, PROPER function examples

TEXT function example

NOW and TODAY functions

Functions to disassemble and reassemble dates

Time function examples

DATEDIF function example

YEARFRAC function example

EDATE and EOMONTH function examples

WORKDAY function example

NETWORKDAYS function example

WEEKDAY and WEEKNUM function examples

CONVERT function example

ISNUMBER ISTEXT ISLOGICAL ISBLANK ISERROR ISFORMULA

AND, OR, and NOT functions

IFNA function with VLOOKUP example

IF function example

IFS function example

VLOOKUP function example

HLOOKUP function example

INDEX and MATCH function example

LOOKUP function example - last non-empty cell

ROW and COLUMN function example

ROWS and COLUMNS function example

HYPERLINK function example

GETPIVOTDATA function example

CHOOSE function example

TRANSPOSE function example

OFFSET function example

INDIRECT function example

COUNT and COUNTA function examples

COUNTIF and COUNTIFS function examples

SUM, SUMIFS, and SUMIFS function examples

AVERAGE, AVERAGEIF, and AVERAGEIFS function examples

MAX, MIN, LARGE, and SMALL function examples

MINIFS and MAXIFS function examples

MODE function example

RANK function example

ABS function example

RAND and RANDBETWEEN function examples

ROUND, ROUNDUP, ROUNDDOWN, INT function examples

MROUND, CEILING, FLOOR functions

MOD function example

SUMPRODUCT function example

SUBTOTAL function example

AGGREGATE function example

LEFT, RIGHT, MID function examples

LEN function example

FIND and SEARCH function examples

REPLACE and SUBSTITUTE function examples

CODE and CHAR function examples

TRIM and CLEAN function examples

CONCAT and TEXTJOIN function examples

EXACT function example

UPPER, LOWER, PROPER function examples

TEXT function example