Excel Introduction and Basics
Excel Introduction and Basics
Excel Introduction and Basics
2 Formulas and Functions: A formula is an expression which calculates the value of a cell. Functions
Range
A range in Excel is a collection of two or more cells. This chapter gives an overview of some very
1. To select cell C3, click on the box at the intersection of column C and row 3.
1. To select the range B2:C4, click on cell B2 and drag it to cell C4.
2. To select a range of individual cells, hold down CTRL and click on each cell that you want to
Fill a Range
To fill a range, execute the following steps.
Result:
This dragging technique is very important and you will use it very often in Excel. Here's another
example.
2a. Enter the value 2 into cell B2 and the value 4 into cell B3.
2b. Select cell B2 and cell B3, click on the lower right corner of this range and drag it down.
Excel automatically fills the range based on the pattern of the first two values. Pretty cool, huh?
3a. Enter the date 6/13/2030 into cell B2 and the date 6/16/2030 into cell B3.
3b. Select cell B2 and cell B3, click on the lower right corner of this range and drag it down.
Move a Range
To move a range, execute the following steps.
1. Select the range, right click, and then click Copy (or press CTRL + c).
2. Select the cell where you want the first cell of the range to appear, right click, and then click Paste
1. Select row 3.
Result:
The rows below the new row are shifted down. In a similar way, you can insert a column.
A formula is an expression which calculates the value of a cell. Functions are predefined formulas and
Cell A3 below contains a formula which adds the value of cell A2 to the value of cell A1.
Cell A3 below contains the SUM function which calculates the sum of the range A1:A2.
Enter a Formula
To enter a formula, execute the following steps.
1. Select a cell.
2. To let Excel know that you want to enter a formula, type an equal sign (=).
3. For example, type the formula A1+A2.
Tip: instead of typing A1 and A2, simply select cell A1 and cell A2.
Excel automatically recalculates the value of cell A3. This is one of Excel's most powerful features!
Edit a Formula
When you select a cell, Excel shows the value or formula of the cell in the formula bar.
1. To edit a formula, click in the formula bar and change the formula.
2. Press Enter.
Operator Precedence
Excel uses a default order in which calculations occur. If a part of the formula is in parentheses, that
part will be calculated first. It then performs multiplication or division calculations. Once this is
complete, Excel will add and subtract the remainder of your formula. See the example below.
First, Excel performs multiplication (A1 * A2). Next, Excel adds the value of cell A3 to this result.
Another example,
First, Excel calculates the part in parentheses (A2+A3). Next, it multiplies this result by the value of
cell A1.
Copy/Paste a Formula
When you copy a formula, Excel automatically adjusts the cell references for each new cell the
2a. Select cell A4, right click, and then click Copy (or press CTRL + c)...
...next, select cell B4, right click, and then click Paste under 'Paste Options:' (or press CTRL + v).
2b. You can also drag the formula to cell B4. Select cell A4, click on the lower right corner of cell A4
and drag it across to cell B4. This is much easier and gives the exact same result!
Insert Function
Every function has the same structure. For example, SUM(A1:A4). The name of this function is SUM.
The part between the brackets (arguments) means we give Excel the range A1:A4 as input. This
function adds the values in cells A1, A2, A3 and A4. It's not easy to remember which function and
which arguments to use for each task. Fortunately, the Insert Function feature in Excel helps you with
this.
1. Select a cell.
2. Click the Insert Function button.
3. Search for a function or select a function from a category. For example, choose COUNTIF from the
Statistical category.
4. Click OK.
7. Click OK.
Result: the COUNTIF function counts the number of cells that are greater than 5.
Note: instead of using the Insert Function feature, simply type =COUNTIF(A1:C2,">5"). When you
arrive at: =COUNTIF( instead of typing A1:C2, simply select the range A1:C2.
Basics
1 Ribbon: Excel selects the ribbon's Home tab when you open it. Learn how to use the ribbon.
2 Workbook: A workbook is another word for your Excel file. When you start Excel, click Blank
3 Worksheets: A worksheet is a collection of cells where you keep and manipulate the data. Each
4 Format Cells: When we format cells in Excel, we change the appearance of a number without
5 Find & Select: Learn how to use Excel's Find, Replace and Go To Special feature.
6 Templates: Instead of creating an Excel workbook from scratch, you can create a workbook based
7 Data Validation: Use data validation in Excel to make sure that users enter certain values into a cell.
8 Keyboard Shortcuts: Keyboard shortcuts allow you to do things with your keyboard instead of your
9 Print: This chapter teaches you how to print a worksheet and how to change some important print
settings in Excel.
10 Share: Learn how to share Excel data with Word documents and other files.
11 Protect: Encrypt an Excel file with a password so that it requires a password to open it.
1 Range: AutoFill | Fibonacci Sequence | Custom Lists | Hide Columns or Rows | Skip Blanks | AutoFit |
2 Formulas and Functions: Most Used Functions | Subtract | Multiply | Divide | Square Root |
You can use the name box in Excel to select a cell, range or named range. You can also use the name
1. We start simple. The name box below displays the address of the active cell (B6).
2. You can use the name box to select a cell, range or named range. For example, click in the name
3. Press Enter.
Note: the name box only displays the upper-left cell of a selected range.
4. Use the name box to quickly create a named range. For example, select the range A2:A9 below,
5. Press Enter.
6. Now let's use this named range in a formula.
7. Finally, click the drop-down arrow in the name box to see a list of all the named ranges in a
Create a named range or a named constant and use these names in your Excel formulas. This way
2. On the Formulas tab, in the Defined Names group, click Define Name.
4. Select the range, type the name in the Name box and press Enter.
5. Now you can use this named range in your formulas. For example, sum Prices.
Named Constant
To create a named constant, execute the following steps.
1. On the Formulas tab, in the Defined Names group, click Define Name.
Name Manager
Use the Name Manager in Excel to view, edit and delete named ranges and named constants.
1. On the Formulas tab, in the Defined Names group, click Name Manager.
4. Click OK.
Result: Excel automatically updates all the formulas that use TaxRate.
Create from Selection
If your data has labels, you can quickly create named ranges in Excel.
2. On the Formulas tab, in the Defined Names group, click Create from Selection.
5. Use the intersect operator (space) to return the intersection of two named ranges.
Dynamic Named Range
A dynamic named range expands automatically when you add a value to the range.
3. When you add a value to the range, Excel does not update the sum.
To expand the named range automatically when you add a value to the range, execute the following
steps.
4. On the Formulas tab, in the Defined Names group, click Name Manager.
5. Click Edit.
6. Click in the "Refers to" box and enter the formula =OFFSET($A$1,0,0,COUNTA($A:$A),1)
Explanation: the OFFSET function takes 5 arguments. Reference: $A$1, rows to offset: 0, columns to
offset: 0, height: COUNTA($A:$A) and width: 1. COUNTA($A:$A) counts the number of values in
column A that are not empty. When you add a value to the range, COUNTA($A:$A) increases. As a
8. Now, when you add a value to the range, Excel updates the sum automatically.
Cell References
Cell references in Excel are very important. Understand the difference between relative, absolute and
Relative Reference
By default, Excel uses relative references. See the formula in cell D2 below. Cell D2 references (points
Cell D3 references cell B3 and cell C3. Cell D4 references cell B4 and cell C4. Cell D5 references cell B5
and cell C5. In other words: each cell references its two neighbors on the left.
Absolute Reference
See the formula in cell E3 below.
1. To create an absolute reference to cell H3, place a $ symbol in front of the column letter and row
The reference to cell H3 is locked (when we drag the formula down and across). As a result, the
correct lengths and widths in inches are calculated. Visit our page about absolute reference to learn
Absolute Reference
To create an absolute reference in Excel, add $ symbols to a cell or range reference. This locks the
Cell
Let's start by locking a reference to a cell.
1. Cell C2 below refers to cell B2 and cell E2. Both references are relative.
2. This is what happens when we copy the formula in cell C2 to cell C3.
3. Lock the reference to cell E2 by placing a $ symbol in front of the column letter and row number
Check:
Explanation: the absolute reference ($E$2) stays the same, while the relative reference (B2) changes
Range
Sometimes you need to lock a reference to a range. For example, when using the RANK function to
1. Cell C2 below refers to cell B2 and the range B2:B7. Both references are relative.
2. This is what happens when we copy the formula in cell C2 to cell C3.
3. Lock the reference to the range B2:B7 by placing $ symbols in front of the column letters and row
numbers.
4. To quickly copy the formula in cell C2 to the other cells, select cell C2, click on the lower right
Check:
Explanation: the absolute reference ($B$2:$B$7) stays the same, while the relative reference (B2)
Named Range
Instead of using absolute range references, create a named range. This way you can make your
1. Select the range B2:B7, type a name in the Name box and press Enter.
2. Now you can use this named range in your formulas. Select cell C2, enter the RANK function
Check:
F4
Use the F4 key to quickly toggle between all 4 types of cell references.
1. For example, select cell C2 below, click in the formula bar and move the insertion point in or to the
right of E2.
4. Press F4 again to create a mixed reference where the column is absolute and the row is relative.
Mixed Reference
Sometimes we need a combination of relative and absolute reference (mixed reference).
2. We want to copy this formula to the other cells quickly. Drag cell F2 across one cell, and look at
Do you see what happens? The reference to the price should be a locked reference to column B.
Solution: place a $ symbol in front of the column letter ($B2) in the formula of cell F2. In a similar
way, when we drag cell F2 down, the reference to the reduction should be a locked reference to row
6. Solution: place a $ symbol in front of the row number (B$6) in the formula of cell F2.
Result:
Note: we don't place a $ symbol in front of the row number of $B2 (this way we allow the reference
to change from $B2 (Jeans) to $B3 (Shirts) when we drag the formula down). In a similar way, we
don't place a $ symbol in front of the column letter of B$6 (this way we allow the reference to
change from B$6 (Jan) to C$6 (Feb) and D$6 (Mar) when we drag the formula across).
3D-reference
A 3D-reference in Excel refers to the same cell or range on multiple worksheets. First, we'll look at the
alternative.
Result:
4. This is quite a lot of work. Instead of doing this, use the following 3D-reference: North:South!B2 as
External References
An external reference in Excel is a reference to a cell or range of cells in another workbook. Below
you can find the workbooks of three divisions (North, Mid and South).
Create External Reference
2. In the Company workbook, select cell B2 and type the equal sign =
3. On the View tab, in the Window group, click Switch Windows.
4. Click North.
Result:
Alert
Close all workbooks. Change a number in the workbook of a division. Close all workbooks again.
Edit Links
On the Data tab, in the Queries & Connections group, click Edit Links to launch the Edit Links dialog
box.
1. If you didn't update the links, you can still update the links here. Select a workbook and click
Update Values to update the links to this workbook. Note how the Status changes to OK.
2. If you don't want to display the alert and update the links automatically, Click Startup Prompt,
Mixed Reference
Sometimes we need a combination of relative and absolute reference (mixed reference).
1. See the formula in cell F2 below.
2. We want to copy this formula to the other cells quickly. Drag cell F2 across one cell, and look at
Do you see what happens? The reference to the price should be a locked reference to column B.
Solution: place a $ symbol in front of the column letter ($B2) in the formula of cell F2. In a similar
way, when we drag cell F2 down, the reference to the reduction should be a locked reference to row
6. Solution: place a $ symbol in front of the row number (B$6) in the formula of cell F2.
Result:
Note: we don't place a $ symbol in front of the row number of $B2 (this way we allow the reference
to change from $B2 (Jeans) to $B3 (Shirts) when we drag the formula down). In a similar way, we
don't place a $ symbol in front of the column letter of B$6 (this way we allow the reference to
change from B$6 (Jan) to C$6 (Feb) and D$6 (Mar) when we drag the formula across).
Use AutoFill in Excel to automatically fill a series of cells. This page contains many easy to follow
1. For example, enter the value 10 into cell A1 and the value 20 into cell A2.
2. Select cell A1 and cell A2 and drag the fill handle down. The fill handle is the little green box at the
Note: AutoFill automatically fills in the numbers based on the pattern of the first two numbers.
4. Select cell A1 and drag the fill handle down. AutoFill automatically fills in the month names.
8. Select cell A1 and drag the fill handle down. AutoFill automatically fills in the day names.
10. Select cell A1 and drag the fill handle down. AutoFill automatically fills in the days.
11. Instead of filling in days, use the AutoFill options to fill in weekdays (ignoring weekend days),
Note: also see the options to fill the formatting only and to fill a series without formatting.
12. Enter the date 1/14/2019 into cell A1 and the date 1/21/2019 into cell A2.
13. Select cell A1 and cell A2 and drag the fill handle down. AutoFill automatically fills in the dates
15. Select cell A1 and drag the fill handle across. AutoFill automatically fills in the times.
16. When Excel doesn't recognize a list, simply create a custom list.
17. Learn how to use Flash Fill to automatically extract data, combine data, and much more.
If you have Excel 365 or Excel 2021, you can also use the SEQUENCE function to fill a series of cells.
18. The SEQUENCE function below generates a two-dimensional array. Rows = 7, Columns = 4, Start
= 0, Step = 5.
19. The SEQUENCE function below generates a list of odd numbers. Rows = 10, Columns = 1, Start =
1, Step = 2.
Note: the SEQUENCE function, entered into cell A1, fills multiple cells. Wow! This behavior in Excel
Dynamic Arrays
Dynamic array formulas, entered into a single cell, fill multiple cells. This behavior in Excel 365/2021
is called spilling.
Formula Example
Let's start with an easy example.
1. Lock the reference to cell E2 by placing a $ symbol in front of the column letter and row number.
2. To quickly copy the formula in cell C2 to the other cells, select cell C2, click on the lower right
Check:
Explanation: the absolute reference ($E$2) stays the same, while the relative reference (B2) changes
3. If you have Excel 365 or Excel 2021, simply enter the dynamic array formula shown below into cell
C2.
4. Press Enter.
Explanation: this dynamic array (DA) formula, entered into cell C2, fills multiple cells. This behavior in
Excel 365/2021 is called spilling. If you select a cell in the range C2:C7, a blue border appears.
5. If you select a cell in the range C3:C7, the formula in the formula bar will be greyed out.
Dynamic Array Functions
Excel 365 and Excel 2021 offer many new dynamic array functions. Follow the links below to learn
1. The SORT function below sorts by the second column, in ascending order.
Note: this dynamic array function, entered into cell F2, fills multiple cells. Wow!
4. The SEQUENCE function below generates a two-dimensional array. Rows = 7, Columns = 4, Start =
0, Step = 5.
5. The UNIQUE function below (with no extra arguments) extracts unique values.
6. The XLOOKUP function below looks up the ID and returns the first name, last name and salary.
Note: if you have Excel 365 or Excel 2021, use XLOOKUP instead of VLOOKUP. The XLOOKUP
7. The SORTBY function sorts a range based on the values in a corresponding range.
to press CTRL + SHIFT + ENTER anymore. Below you can find a few examples.
2. The same formula in Excel 365/2021 finished by simply pressing Enter. Bye bye curly braces.
3. A traditional TRANSPOSE function entered by preselecting the range E2:E4 and finished by
4. The same function in Excel 365/2021, entered into a single cell, spills to neighboring cells.
Spill Range
To refer to the values inside the blue rectangle, also called the spill range, always use the first cell
1. For example, the UNIQUE function below, entered into cell C1, extracts unique values.
2. The COUNTA function below uses the spill range (C1#) to count unique values.
3. If something is blocking the spill range, Excel displays the #SPILL! error.
Note: in this example, simply empty cell C6 to fix the #SPILL error.
Fibonacci Sequence
It's easy to create all sorts of sequences in Excel. For example, the Fibonacci sequence.
Extract Numbers
Use flash fill in Excel to extract the numbers in column A below.
1. First, tell Excel what you want to do by entering the value 4645 into cell B1.
2. On the Data tab, in the Data Tools group, click Flash Fill (or press CTRL + E).
Result:
Combine Names
Use flash fill in Excel to combine the last names in column A below and the first names in column B
1. First, tell Excel what you want to do by entering a correct email address in cell C1.
2. On the Data tab, in the Data Tools group, click Flash Fill (or press CTRL + E).
Result:
Reformat Numbers
Use flash fill in Excel to reformat the numbers in column A below.
1. First, tell Excel what you want to do by entering a correct social security number in cell B1.
2. On the Data tab, in the Data Tools group, click Flash Fill (or press CTRL + E).
Result:
Rearrange Numbers
Use flash fill in Excel to rearrange the numbers in column A below.
1. First, tell Excel what you want to do by entering a new credit card number in cell B1 (for example,
2. On the Data tab, in the Data Tools group, click Flash Fill (or press CTRL + E).
Result:
Extract Letters
Use flash fill in Excel to extract letters from text strings.
1. First, tell Excel what you want to do by entering the letters from the first text string in cell B1.
2. On the Data tab, in the Data Tools group, click Flash Fill (or press CTRL + E).
Result:
example, use flash fill in Excel to extract the numbers in column A below.
1. First, tell Excel what you want to do by entering the value 130 into cell B1.
2. On the Data tab, in the Data Tools group, click Flash Fill (or press CTRL + E).
Result:
Note: flash fill did not correctly extract the decimal numbers (only the digits after the decimal point).
3. Immediately after executing step 2, change the value in cell B3 to 26.2 and Excel will correctly
4. For example, if you change the number in cell A1 to 200, Excel will not update the number in cell
B1.