Formulas and functions are the bread and butter of Excel.

They drive almost everything interesting and useful you will ever do in a spreadsheet.

This article introduces the basic concepts you should probably know to be proficient with formulas in Excel.More examples here.

Basic formula example - 1 + 3 = 3

What is a formula?

A formula in Excel is an expression that returns a specific result.

For example:

Note: all formulas in Excel must begin with an equals sign (=).

Basic formula example - 1 + 3 = 3

Cell references

In the examples above, values are “hardcoded”.

That means results won’t change unless you edit the formula again and change a value manually.

Instead, usecell referencesso values can be changed at any time.

Basic formula example - 1 + 3 = 3

Below a formula is used to calculate percent change.

The formula returns a correct result in D2 and D3, but returns a #DIV/0!

error in D4, because B4 is empty:

There are different ways of handling errors.

Basic formula example - 1 + 3 = 3

This means you don’t need to enter the same basic formula again and again.

Cell addresses are updated again:

Relative and absolute references

The cell references above are calledrelativereferences.

This means the reference is relative to the cell it lives in.

Basic formula example - 1 + 3 = 3

Now we can easily change the value in A1, and all three formulas recalculate.

Tip: you might toggle between relative and absolute syntax with theF4 key.

Note references are color-coded:

All formulas in Excel must begin with an equals sign (=).

Basic formula example - 6 / 3 = 2

If you want to cancel, and leave the formula unchanged, tap the Escape key.

Video:20 tips for entering formulas

What is a function?

They are closely related, but not exactly the same.

Formula with cell references

Technically, a formula isanyexpression that begins with an equals sign (=).

A function, on the other hand, is a formula with a special name and purpose.

In most cases, functions have names that reflect their intended use.

Formula result can be an error

To get started, see101 Key Excel functions.

Function arguments

Most functions require inputs to return a result.

These inputs are called “arguments”.

Formula in E1 copied to clipboard

A function’s arguments appear after the function name, inside parentheses, separated by commas.

All have a name, and an opening and closing parentheses ().

The formula in C1 is:

Video:How to use the COUNTIF function

Not all arguments are required.

Formula in E1 pasted to E2

Arguments shown in square brackets [ ] are optional.

See below for an example of how to use YEARFRAC to calculate current age based on birthdate.

How to enter a function

If you know the name of the function, just start typing.

Formula in E1 pasted to E3

Here are the steps:

1.

Enter an equals sign (=) and start typing.

  1. pop in the Tab key to accept a function.

Absolute reference example

Excel will complete the function:

3.

Fill in required arguments:

4.

First, any expressions in parentheses are evaluated.

Absolute reference example after value in A1 is changed

Next Excel will solve for any exponents.

After exponents, Excel will perform multiplication and division, then addition and subtraction.

If the formula involvesconcatenation, this will happen after standard math operations.

Entering a formula with point and click references

Finally, Excel will evaluatelogical operators, if present.

Tip: you could use theEvaluate featureto watch Excel solve formulas step-by-step.

This overwrites the formulas with the values they return.

Forgot to enter an equals sign means no formula, just text

Video:Paste Special Shortcuts

What’s next?

Below are guides to help you learn more about Excel’s formulas and functions.

We also offeronline video training.

COUNTIF requires two arguments, range and criteria

As you type, Excel will show matching functions

Press Tab to enter selected function

Enter required arguments

Press Enter to confirm and enter the function

Need a formula to calculate current age in B2

YEARFRAC will calculate years with a start date and end date

B1 for start date, the TODAY function to supply end date

YEARFRAC and TODAY functions to calculate current age

YEARFRAC and TODAY inside INT

Entering a formula with point and click references

YEARFRAC and TODAY functions to calculate current age

YEARFRAC and TODAY inside INT