Reference values in excel

Excel for Microsoft 365 Excel for the web Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 Excel 2007 More…Less

A cell reference refers to a cell or a range of cells on a worksheet and can be used in a formula so that Microsoft Office Excel can find the values or data that you want that formula to calculate.

In one or several formulas, you can use a cell reference to refer to:

  • Data from one or more contiguous cells on the worksheet.

  • Data contained in different areas of a worksheet.

  • Data on other worksheets in the same workbook.

For example:

This formula:

Refers to:

And Returns:

=C2

Cell C2

The value in cell C2.

=A1:F4

Cells A1 through F4

The values in all cells, but you must press Ctrl+Shift+Enter after you type in your formula.

Note: This functionality doesn’t work in Excel for the web.

=Asset-Liability

The cells named Asset and Liability

The value in the cell named Liability subtracted from the value in the cell named Asset.

{=Week1+Week2}

The cell ranges named Week1 and Week2

The sum of the values of the cell ranges named Week1 and Week 2 as an array formula.

=Sheet2!B2

Cell B2 on Sheet2

The value in cell B2 on Sheet2.

  1. Click the cell in which you want to enter the formula.

  2. In the formula bar Button image, type = (equal sign).

  3. Do one of the following:

    • Reference one or more cells    To create a reference, select a cell or range of cells on the same worksheet.

      You can drag the border of the cell selection to move the selection, or drag the corner of the border to expand the selection.

    • Reference a defined name    To create a reference to a defined name, do one of the following:

      • Type the name.

      • Press F3, select the name in the Paste name box, and then click OK.

        Note: If there is no square corner on a color-coded border, the reference is to a named range.

  4. Do one of the following:

    • If you are creating a reference in a single cell, press Enter.

    • If you are creating a reference in an array formula (such A1:G4), press Ctrl+Shift+Enter.

      The reference can be a single cell or a range of cells, and the array formula can be one that calculates single or multiple results.

      Note: If you have a current version of Microsoft 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output range, entering the formula in the top-left-cell of the output range, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.

You can refer to cells that are on other worksheets in the same workbook by prepending the name of the worksheet followed by an exclamation point (!) to the start of the cell reference. In the following example, the worksheet function named AVERAGE calculates the average value for the range B1:B10 on the worksheet named Marketing in the same workbook.

Sheet reference example

1. Refers to the worksheet named Marketing

2. Refers to the range of cells between B1 and B10, inclusively

3. Separates the worksheet reference from the cell range reference

  1. Click the cell in which you want to enter the formula.

  2. In the formula bar Button image, type = (equal sign) and the formula you want to use.

  3. Click the tab for the worksheet to be referenced.

  4. Select the cell or range of cells to be referenced.

Note: If the name of the other worksheet contains nonalphabetical characters, you must enclose the name (or the path) within single quotation marks ().

Alternatively, you can copy and paste a cell reference and then use the Link Cells command to create a cell reference. You can use this command to:

  • Easily display important information in a more prominent position. Let’s say that you have a workbook that contains many worksheets, and on each worksheet is a cell that displays summary information about the other cells on that worksheet. To make these summary cells more prominent, you can create a cell reference to them on the first worksheet of the workbook, which enables you to see summary information about the whole workbook on the first worksheet.

  • Make it easier to create cell references between worksheets and workbooks. The Link Cells command automatically pastes the correct syntax for you.

  1. Click the cell that contains the data you want to link to.

  2. Press Ctrl+C, or go to the Home tab, and in the Clipboard group, click Copy Button image.

    Clipboard group on the Home tab

  3. Press Ctrl+V, or go to the Home tab, in the Clipboard group, click Paste Button image.

    By default, the Paste Options Button image button appears when you paste copied data.

  4. Click the Paste Options button, and then click Paste Link Button image.

  1. Double-click the cell that contains the formula that you want to change. Excel highlights each cell or range of cells referenced by the formula with a different color.

  2. Do one of the following:

    • To move a cell or range reference to a different cell or range, drag the color-coded border of the cell or range to the new cell or range.

    • To include more or fewer cells in a reference, drag a corner of the border.

    • In the formula bar Button image, select the reference in the formula, and then type a new reference.

    • Press F3, select the name in the Paste name box, and then click OK.

  3. Press Enter, or, for an array formula, press Ctrl+Shift+Enter.

    Note: If you have a current version of Microsoft 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output range, entering the formula in the top-left-cell of the output range, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.

Frequently, if you define a name to a cell reference after you enter a cell reference in a formula, you may want to update the existing cell references to the defined names.

  1. Do one of the following:

    • Select the range of cells that contains formulas in which you want to replace cell references with defined names.

    • Select a single, empty cell to change the references to names in all formulas on the worksheet.

  2. On the Formulas tab, in the Defined Names group, click the arrow next to Define Name, and then click Apply Names.

    Defined Names group on the Formulas tab

  3. In the Apply names box, click one or more names, and then click OK.

  1. Select the cell that contains the formula.

  2. In the formula bar Button image, select the reference that you want to change.

  3. Press F4 to switch between the reference types.

For more information about the different type of cell references, see Overview of formulas.

  1. Click the cell in which you want to enter the formula.

  2. In the formula bar Button image, type = (equal sign).

  3. Select a cell or range of cells on the same worksheet. You can drag the border of the cell selection to move the selection, or drag the corner of the border to expand the selection.

  4. Do one of the following:

    • If you are creating a reference in a single cell, press Enter.

    • If you are creating a reference in an array formula (such A1:G4), press Ctrl+Shift+Enter.

      The reference can be a single cell or a range of cells, and the array formula can be one that calculates single or multiple results.

      Note: If you have a current version of Microsoft 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output range, entering the formula in the top-left-cell of the output range, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.

You can refer to cells that are on other worksheets in the same workbook by prepending the name of the worksheet followed by an exclamation point (!) to the start of the cell reference. In the following example, the worksheet function named AVERAGE calculates the average value for the range B1:B10 on the worksheet named Marketing in the same workbook.

Sheet reference example

1. Refers to the worksheet named Marketing

2. Refers to the range of cells between B1 and B10, inclusively

3. Separates the worksheet reference from the cell range reference

  1. Click the cell in which you want to enter the formula.

  2. In the formula bar Button image, type = (equal sign) and the formula you want to use.

  3. Click the tab for the worksheet to be referenced.

  4. Select the cell or range of cells to be referenced.

Note: If the name of the other worksheet contains nonalphabetical characters, you must enclose the name (or the path) within single quotation marks ().

  1. Double-click the cell that contains the formula that you want to change. Excel highlights each cell or range of cells referenced by the formula with a different color.

  2. Do one of the following:

    • To move a cell or range reference to a different cell or range, drag the color-coded border of the cell or range to the new cell or range.

    • To include more or fewer cells in a reference, drag a corner of the border.

    • In the formula bar Button image, select the reference in the formula, and then type a new reference.

  3. Press Enter, or, for an array formula, press Ctrl+Shift+Enter.

    Note: If you have a current version of Microsoft 365, then you can simply enter the formula in the top-left-cell of the output range, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output range, entering the formula in the top-left-cell of the output range, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.

  1. Select the cell that contains the formula.

  2. In the formula bar Button image, select the reference that you want to change.

  3. Press F4 to switch between the reference types.

For more information about the different type of cell references, see Overview of formulas.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

In order to make accurate calculations in Excel, it’s essential to understand how the different types of cell references work.

A1 vs. R1C1 References

Excel worksheets contain many cells and (by default) each cell is identified by its column letter followed by its row number. This is known as A1-style referencing. Examples: A1, B4, C6

a1 ref

A1 reference style

Optionally, you can switch to R1C1 Reference Mode to refer to a cell’s row & column number. Instead of referring to cell A1 you would refer to R1C1 (row 1, column 1). Cell C4 would be referred to R4C3.

r1c1 ref

R1C1 reference style

R1C1-style referencing is extremely uncommon in Excel. Unless you have a good reason you should probably stick to the default A1-style reference mode. However, if you use VBA you will likely encounter this reference style.

Switch to R1C1 Reference Style

To switch the reference style, go to File > Option > Formula. Check the box next to R1C1 reference style.

switch to r1c1

Named Ranges

One of the most under-utilized features of Excel is the Named Ranges feature. Instead of referring to a cell (or group of cells) by its cell location (ex B3 or R3C2), you can name that range and simply reference the range name in your formulas.
To name a range:

  1. Select the cell or cells that you wish to name
  2. Click Inside the Range Name Box
  3. Enter your desired name
  4. Hit Enter

named ranges 1         named ranges 2

Now you can reference cell A1 by typing =range_name1 instead. This is very useful when working with large workbooks with multiple worksheets.

named ranges 3

Range of Cells

When using Excel’s built in Functions, you may need to reference ranges of cells. Cell ranges appear like this ‘A1:B3’. This reference refers to all cells in between A1 and B3: cells A1,A2,A3, B1, B2, B3.
To select a range of cells when entering a formula:

  • Type in the range (separate the start and end range with a semicolon)
  • Use your mouse to click the first cell reference, hold down the mouse button and drag your desired range.
  • Hold down the shift key and navigate with the arrow keys to select your range

Absolute (Frozen) and Relative References

When entering cell references within formulas, you can use relative or absolute (frozen) references. Relative references will move proportionally when you copy the formula to a new cell. Absolute references will remain unchanged. Let’s look at some examples:

Relative Reference

A relative reference in Excel looks like this

=A1

When you copy and paste a formula with relative references, the relative references will move proportionally. Unless you specify otherwise, your cell references will be relative (unfrozen) by default.
Example: If you copy ‘=A1’ down one row the reference changes to ‘=A2’.

relative ref

Absolute (Frozen) Cell References

If you don’t want your cell references to move when you copy a formula, you can “freeze” your cell references by adding dollar signs ($s) in front of the reference that you want frozen. Now when you copy and paste the formula, the cell reference will remain unchanged. You can choose to freeze the row reference, column reference, or both.

A1: Nothing is frozen

$A1: The column is frozen, but the row is not frozen

A$1: The row is frozen, but the column is not frozen

$A$1: Both the row and column are frozen

Absolute Reference Shortcut

Manually adding in dollar signs ($s) into your formulas isn’t very practical. Instead, while creating your formula, use the F4 key to toggle between absolute/relative cell references.

Absolute Cell Reference Example

When would you actually need to freeze a cell reference? One common example is when you have input cells that are referenced frequently. In the example below, we want to calculate the sales tax for each quantity of menu items. The sales tax is constant across all items, so we will reference the sales tax cell repeatedly.

absolute ref
To find the total sales tax, enter the formula ‘=(B3*C3)*$C$1’ in column D and the copy the formula down.

Mixed Reference

You may have heard of mixed cell references. A mixed reference is when either the row or column reference is locked (but not both).

mixed ref

Mixed Reference

Remember, by using the “F4” key you are able to cycle through your relative, absolute cell references.

Cell References – Inserting & Deleting Rows/Columns

You may be wondering what happens to your cell references when you insert or delete rows/columns?
The cell reference will update automatically to refer to the original cell. This is the case regardless of whether the cell reference is frozen.

3D References

At times, you may need to work with several worksheets with identical patterns of data. Excel allows you to refer to multiple sheets at once without needing to manually enter each worksheet. You can reference a range of sheets similar to how would reference a range of cells. Example ‘Sheet1:Sheet5!A1’ would reference cells A1 on all sheets from Sheet1 to Sheet5.

Let’s walk through an example:

You want to add together the total units sold for each product across all stores. Each store has its own worksheet and all the worksheets have an identical format. You could create a formula similar to this:

3d ref

This is not too difficult with only four worksheets, but what if you had 40 worksheets? Would you really want to manually add each cell reference?

Instead, you can use a 3D reference to reference multiple sheets at once with ease(similar to how you can reference a range of cells).

condensed 3d ref
Be Careful! The order of your worksheets matters. If you move another sheet in between the referenced sheets (StoreA and StoreD) that sheet will be included. Conversely, if you move a sheet outside the range of sheets (before StoreA or after StoreD), it will no longer be included.

Circular Cell Reference

A circular cell reference is when a cell refers back to itself. For example, if the result of cell B1 is used as an input for cell B1 then a circular reference is created. The cell does not need to directly refer to itself There can be intermediate steps.

Example:

circular cell ref 0

In this case, the formula for cell B2 is “A2+A3+B2”. Because you are in cell B2, you may not use B2 in the equation. This would trigger circular reference and the value in cell “B2” will automatically be set to “0”.
Usually circular references are a result of user error, but in there are circumstances in which you may want to use a circular reference. The primary example of using a circular reference is to calculate values iteratively. To do this, you need to go to File > Options > Formulas and Enabled Iterative Calculation:

circular cell iteratiion

External References

At times when calculating data you may need to refer to data outside of your workbook. This is called an external reference (link).

To select an external reference while creating a formula, navigate to the external workbook, and select your reference as you normally would.

To navigate to the other workbook you can use the CTRL + TAB shortcut or go to View > Switch Windows.

ref to external 1

Once you’ve selected the cell, you’ll see that an external reference that looks like this:

ref to external 2

Notice that the workbook name is enclosed by brackets [].

Once you close the referenced workbook, the reference will show the file location:

ref to external 3

When you reopen the workbook containing the external link, you will be prompted to enable automatic updating of links. If you do so, then Excel will open the reference value with the current value of the workbook. Even if it’s closed! Be careful! You may or may not want this.

Named Ranges and External References

What happens to your external cell reference when rows / columns are added or deleted from the reference workbook? If both workbooks are open then the cell references update automatically. However, if both workbooks aren’t open then the cell references won’t update and will no longer be valid. This is a huge concern when linking to external workbooks. Many errors are caused by this.
If you do link to external workbooks, you should name the cell reference with a named range (see previous section for more information). Now your formula will refer to the named range no matter what changes occur on the external workbook.

,

What Do You Mean By Cell Reference in Excel?

A cell reference in Excel refers to other cells to a cell to use its values or properties. So in simple terms, if we have data in some random cell A2 and we want to use that value of cell A2 in cell A1, we can use =A2 in cell A1. So it will copy the value of A2 in A1. So it is called cell referencing in Excel.

For example, suppose you insert C1O. As a result, it will expand “Column C” and the “10th Row.” Likewise, we can also define or declare cell references to any location in the worksheet. We may also activate another way for cell reference, e.g., R7C7 from Excel “Options,” where R7 is Row 7 and C7 is Column 7.

Table of contents
  • What Do You Mean By Cell Reference in Excel?
    • Explained
    • Types of Cell Reference in Excel
    • #1 How to Use Relative Cell Reference?
    • #2 How to Use Absolute Cell Reference?
    • #3 How to Use Mixed Cell Reference?
    • Things to Remember
    • Recommended Articles

Explained

  • Excel worksheet is made up of cells. Each cell has a cell reference.
  • Cell reference contains one or more letters or the alphabet followed by a number where the letter or alphabet indicates the column and the number represents the row.
  • Each cell can be located or identified by its cell reference or address, e.g., B5.
  • Each cell in an Excel worksheet has a unique address. The address of each cell is defined by its location on the grid. g. In the below-mentioned screenshot, the address “B5” refers to the cell in the fifth row of column B.

Cell Reference

Even if we enter the cell address directly in the grid or name window, it will go to that cell location in the worksheet. Cell references can refer to either one cell, a range of cells, or entire rows and columns.

When a cell reference refers to more than one cell, it is called “range.” E.g., A1:A8 indicates the first 8 cells in column A. In between, a colon is used.

Types of Cell Reference in Excel

  1. Relative cell references: It does not contain dollar signs in a row or column, e.g., A2. Relative cell reference type in ExcelIn Excel, relative references are a type of cell reference that changes when the same formula is copied to different cells or worksheets. Let’s say we have =B1+C1 in cell A1, and we copy this formula to cell B2 and it becomes C2+D2.read more changes when a formula is copied or dragged to another cell. In Excel, cell referencing is relative by default. It is the most commonly used cell reference in the formula.
  2. Absolute cell references: Absolute cell reference Absolute reference in excel is a type of cell reference in which the cells being referred to do not change, as they did in relative reference. By pressing f4, we can create a formula for absolute referencing.read more contains dollar signs attached to each letter or number in a reference, e.g., $B$4. Suppose we mention a dollar sign before the column and row identifiers. It makes absolute or locks both the column and the row, i.e., where cell reference remains constant even if it is copied or dragged to another cell.
  3. Mixed cell references in Excel: In Excel, mixed cell references contain dollar signs attached to either the letter or the number in a reference. E.g., $B2 or B$4. It is a combination of relative and absolute references.

Now, let us discuss each cell reference in detail –

You can download this Cell Reference Excel Template here – Cell Reference Excel Template

#1 How to Use Relative Cell Reference?

The below-mentioned pharma sales table below contains medicine “Products” in column C (C10:C16), “Quantity Sold” in column D (D10:D16), and “Total_Sales_Value” in column F, which we need to find out.

Cell Reference Example 1

To calculate the total sales for each item, we need to multiply the price of each item by its quantity of that.

Let us check out the first item; for the first item, the formula in cell F10 would be multiplication in ExcelMultiplication in excel is performed by entering the comparison operator “equal to” (=), followed by the first number, the “asterisk” (*), and the second number.read more – D10*E10.Cell Reference Example 1-1

It returns the total sales value.

Cell Reference Example 1-2

Instead of entering the formula for all the cells, we can apply a formula to the entire range. To copy the formula down the column, click inside cell F10 to see that the cell is selected. Then, select the cells till F16. So, that column range will get selected. Then, we will click “Ctrl+D” to apply the formula to the entire range.

Cell Reference Example 1-3

Here, when you copy or move a formula with a relative cell reference to another row. Automatically, row references will change (similarly for columns also)

We can notice that the cell reference automatically adjusts to the corresponding row.

To check a relative reference, we must select any of the “Total _Sales_ Value” cells in column F, and we can view the formula in the formula bar. E.g., In cell F14, we can observe that the formula has been changed from D10*E10 to D14*E14.

Cell Reference Example 1-4

#2 How to Use Absolute Cell Reference?

The below-mentioned pharma product table contains medicine “Products” in column H (H6:H12), and it’s “Old_Price” in column I (I6:I12), and “New_Price” in column J, which we need to find out with the help of absolute cell reference.

Cell Reference Example 2

We can see that the rate for each product is increased by 5% effective from Jan 2019 and is listed in cell “K3”.

Cell Reference Example 2-1

To calculate the “New_Price” for each item, we need to multiply the old price of each item by the percentage price increase (5%) and add the “Old_Price” to it.

Let us check out the first item. For the first item, the formula in cell J6 would be =I6*$K$3+I6, which returns the new price.

Cell Reference Example 2-2

Here, the percentage rate increase for each product is 5%, a common factor. Therefore, we must add a dollar symbol in front of the row and column number for the cell “K3” to make it an absolute reference, i.e., $K$3. We can add it by clicking the “function+F4” key once.

Here the dollar sign for the cell “K3” fixes the reference to a given cell, where it remains unchanged no matter when you copy or apply a formula to other cells.

Cell Reference Example 2-3

Here, $K$3 is an absolute cell reference, whereas “I6” is a relative cell reference. It changes when you apply it to the next cell.

cell reference in excel example 2

Instead of entering the formula for all the cells, we can apply a formula to the entire range. To copy the formula down the column, click inside cell J6 to see that the cell has been selected. Then, we must select the cells till J12. So, that column range will get selected. Then click “Ctrl+D” so the formula is applied to the entire range.

Cell Reference Example 2-4

#3 How to Use Mixed Cell Reference?

In the below-mentioned table, we have values in each row (D22, D23, and D24) and columns (E21, F21, and G21). Here, we have to multiply each column with each row with the help of a mixed cell reference.

Example 3

We can use two mixed-cell references here to get the desired output.

Let us apply two types of mixed references below in cell “E22.”

The formula would be =$D22*E$21

Example 3-1

#1 – $D22: Absolute column and Relative row

example 3

The dollar sign before column D indicates that only the row number can change. At the same time, the column letter D is fixed. It does not change.

When we copy the formula to the right side, the reference will not change because it is locked, but When you copy it down, the row number will change because it is not locked.

#2 – E$21: Absolute row and Relative column

example 3

The dollar sign right before the row number indicates only the column letter E can change. Whereas the row number is fixed; it does not change.

The row number will not change when copying the formula because it is locked. But when we copy the formula to the right side, the column alphabet will change because it is not locked.

Instead of entering the formula for all the cells, we can apply a formula to the entire range. Now, we will click inside cell E22. As a result, first, we will see that the cell is selected. Then, we will select the cells until G24 so that the entire range will get selected. Next, we will click on the “Ctrl+D” key and, later, “Ctrl+R.”

Example 3-2

Things to Remember

  • The cell reference is a key element of formula or excels functions.
  • Cell references are used in Excel functions, formulas, charts, and various other Excel commandsVLOOKUP function, IF condition, CONCATENATE function, find MAXIMUM and MINIMUM values are the most commonly used excel commands.read more.
  • Mixed reference locks either of one. It may be a row or column, but not both.

Recommended Articles

This article is a guide to Cell Reference in Excel. We discuss how to cell references in Excel, along with three types, examples, and downloadable templates. You may learn more about Excel from the following articles: –

  • 3D Reference Excel – Examples
  • Timesheet in Excel
  • Excel Auto Numbering
  • Solver in Excel
  • Programming in Excel

Microsoft Excel, sometimes known as MS Excel, is a potent spreadsheet programme. In Excel, each worksheet consists of a number of cells that are made up of rows and columns. Each cell has a unique reference, which enables users to quickly access and address the required cell (or cells) within the functions. In Excel, cell references are crucial, particularly when working with huge data sets in functions and formulas.

This article covers a quick overview of Excel Cell References. The various sorts of cell references that Excel offers and the detailed instructions for using each one are also covered in the article.

What is a Cell Reference?

An Excel cell reference, also known as a cell address, is a mechanism that defines a cell on a worksheet by combining a column letter and a row number. We can refer to any cell (in Excel formulas) in the worksheet by using the cell references.

For example:

Cell Reference Excel

Here we refer to the cell in column A & row 2 by A2 & cell in column A & row 5 by A5. You can make use of such notations in any of the formulas or copy the value of one cell to another cell (by using = A2 or = A5).

Types of Cell Reference in Excel

Understanding various cell references primarily makes it easier for us to use Excel formulas and avoid unexpected formula errors. When copying and pasting Excel formulas, this is quite useful. Based on various use situations, Excel offers three main types of cell references, including:

  • Relative Cell Reference
  • Absolute Cell Reference
  • Mixed Cell Reference

1. Relative Cell Reference 

In Excel, a relative cell reference is used by default. Excel uses a relative reference whenever we insert a cell reference or a range within a formula. The relative references, which commonly reflect the combination of column name and row number, are used normally with the associated cell references. There is no dollar ($) sign in the relative reference for the cell. 

How to Use Relative Cell References in Excel

Let’s see how to use the Relative Cell references through examples,

#Example 1: 

If you refer to cell B1 from cell E1, actually you would be referring to a cell that is 3 columns to the left (E-B = 3) within the same row number 1. 

When it is copied to other locations present in a worksheet, the relative reference for that location will be changed automatically. (because relative cell reference describes offset to another cell rather than a fixed address as In our example, offset is : 3 columns left in the same row).

Relative Cell References in Excel

#Example 2: 

If you copy the formula = C2 / A2 from the cell “E2” to “E3”, the formula in E3 will automatically become =C3/A3.

relative reference excel formula

When to Use Relative Cell References in Excel

When you need to develop a formula for a set of cells and the formula needs to make a reference to a relative cell reference, relative cell references come in handy.

When this occurs, you can create the formula in one cell and copy it before pasting it into every other cell.

2. Absolute Cell Reference 

When copying or using AutoFill, there are times when the cell reference must stay the same. A column and/or row reference is kept constant using dollar signs. So, to get an absolute reference from a relative, we can use the dollar sign ($) characters.

To refer to an actual fixed location on a worksheet whenever copying is done, we use absolute reference. The reference here is locked such that rows and columns do not shift when copied. 

How to Use Absolute Cell References in Excel

Below is an example depicting how to use Absolute Cell References in Excel.

#Example: 

When we fix both row & column – Say if we want to lock row 2 & column A, we will use $A$2 as:

G2 = C2/$A$2, when copied to G3, G3 becomes = C3/$A$2

 Note: C3 is 4 columns left to G3 in the same row.

Absolute Cell References in Excel

Here, original cell reference A2 is maintained whenever we copy G2 to any of the cells. So I3 = E3/$A$2 because E3 comes from the relative reference (4 columns left to the current one) & /$A$2 comes from the absolute reference.

Therefore, I3 = E3//$A$2 = 12/10 = 1.2

What Does the Dollar ($) Sign Do?

When the row and column numbers are preceded by the dollar symbol ($), it becomes absolute (i.e., stops the row and column number from changing when copied to other cells). Dollar ($) before the row fixes the row & before the column fixes the column.

When to Use Absolute Cell References in Excel

When you don’t want the cell reference to alter when you replicate formulas, absolute cell references come in handy. This can be the situation if you have to use a fixed value in the formula.

3. Mixed Cell Reference 

An absolute column and relative row, or an absolute row and relative column, is a mixed cell reference. You get an absolute column or absolute row when you individually put the $ before the column letter or before the row number. Example: $B8 is relative to row 8 but absolute for column B, and B$8 is absolute for row 1 but relative for column A.

Here, the Dollar ($) before the row number fixes/locks the row & before the column name fixes/locks the column.

#Example: 

When we fix the only row: If we have G2 = C2/A$2 then :

We used $ before the row number, so we are locking the only row here. When G2 is copied to G3, G3 = C3/A$2 (not C3/A3) because the row has been fixed already.

Mixed Cell Reference

Here, whenever we copy G2 to any other cell, always the divisor will refer to a fixed row 2 (column vary according to the concept of relative reference)

So, when G2 is copied to I3, I3 = E3/C$2 because E3 comes from the relative reference (4 columns left to the current one) & C$2 comes from the absolute reference for row & relative reference for Column (6 Columns left to the current one)

Some Other Ways of Using Cell References With Examples

Now that we are familiar with the basics of using Cell References in Excel, let’s see some other ways of using cell references.

Relative and Absolute Cell References for Calculating Dates 

We can use relative and absolute cell references to calculate dates.

Example: To Calculate the Date of Delivery online from the given date of the order placed & no of days it will take to deliver :

Relative and absolute cell references for calculating dates

Here, We calculate the Date of Delivery by = Order Date + No of days to deliver. We used Relative cell reference so that individual product delivery dates can be calculated.

Absolute cell references for calculating dates :

Example: To Calculate the Date of Birth When the age is known is a number of days using Current date can be done by making use of absolute reference. 

Relative and Absolute Cell References

Here, We calculate DOB by = Current Date – Age in days. The Current date is contained in the cell E2 & in subtraction, we fixed that date to subtract from the days.

Whole Column Reference 

You will want to refer to all the cells inside a particular column when operating with an Excel worksheet with any number of rows. Simply type a column letter twice with a colon in between to refer to the entire column B, for example, B:B.

Example: You may want to find the sum of a column of data in certain cases. While you can do this with a regular cell range, such as =SUM(B1:B10), you will need to change the cell range if your spreadsheet grows in size.

Excel, on the other hand, has a cell range that does not require the row number and takes all the cells in the column in action. If you wanted to find the sum of all the values in column B, for example, you would type =SUM (B:B). You can add as much data as you want to your spreadsheet without having to change your cell ranges if you use this type of cell range.

Whole Column Reference

Whole Row Reference 

You will want to refer to all the cells inside a particular row when operating with an Excel worksheet with any number of columns. Simply type a row number twice with a colon in between to refer to the entire row, for example, 2:2.

Example: You may want to find the sum of a row of data in certain cases. While you can do this with a regular cell range, such as =SUM(A2 : J2), you will need to change the cell range if your spreadsheet grows in size.

Excel, on the other hand, has a cell range that does not require the column letter and takes all the cells in the row in action. If you wanted to find the sum of all the values in row 2, for example, you would type =SUM (2:2). You can add as much data as you want to your spreadsheet without having to change your cell ranges if you use this type of cell range.

Whole Row Reference

Refer to an Entire Column, Excluding the First Few Rows 

To refer to the entire column excluding the first few rows, you need to specify the range as we give in a normal fashion. We know that the Excel worksheets can have only 1,048,576 rows. (To check this, go to an empty cell & press: Ctrl + Down arrow Key)

So, we can do the sum of the entire column B except for the first 5 rows by = SUM(B6:B1048576).

Refer to an Entire Column Excluding the First Few Rows

Using a Mixed Entire Column Reference in Excel 

You can also create a mixed entire-column reference, say for example $B:B. But, practically, it is difficult to find a situation where it would be used.

Example :

Mixed Entire Column Reference in Excel

How to switch between Absolute, Relative, and Mixed References

The $ sign can be manually typed in an Excel formula to adjust a relative cell relation to absolute or mixed. You can also speed things up by pressing the F4 key. You must be in formula edit mode to use the F4 shortcut. The steps are :
Firstly, choose the cell that contains the formula. Then, by pressing the F2 key or double-clicking the cell, you can enter Edit mode. Select the cell reference in which you want to make changes. Then, switch between four-cell reference forms by pressing F4.

Example: When you select a cell having only relative reference (i.e., no $ sign), say = B2:

  • The first time when you press F4, it becomes =$B$2
  • The second time when you press F4, it becomes =B$2
  • The third time when you press F4, it becomes=$B2
  • The fourth time when you press F4, it becomes back to the relative reference=B2

B2 –Press F4–> =$B$2  –Press F4–> =B$2 –Press F4–> = =$B2  –Press F4–> =B2

So, using F4, you do not require to manually type the $ symbol.

Important Points to Remember

  • One of the crucial components for Excel functions or formulas is the cell reference.
  • Excel formulas that employ relative cell references automatically change the references to match the correct row and column.
  • When copying formulas into non-relative cells, absolute cell references are advised. Excel keeps the absolute cell references constant.
  • According to the specifications, a mixed reference only locks one of the references, either the row or the column. Not both are locked.

FAQs on Excel Cell References 

1. What are the 3 types of cell references in Excel?

Ans: In Excel, we can use one of three types of cell references:

  • Relative Cell References
  • Absolute Cell References
  • Mixed Cell References

To be able to reference cells and ranges is what makes any spreadsheet tool work. And Excel is the best and most powerful one out there.

In this tutorial, I will cover all that you need to know about how to reference cells and ranges in Excel. Apart from the basic referencing on the same sheet, the major part of this tutorial would be about how to reference another sheet or workbook in Excel.

While there is not much difference in how it works, when you reference another sheet in the same file or reference a completely separate Excel file, the format of that reference changes a bit.

Also, there are some important things you need to keep in mind when referencing another sheet or other external files.

But worry… nothing too crazy!

By the time you’re done with this tutorial, you will know all there is to know about referencing cells and ranges in Excel (be in the same workbook or another workbook).

Let’s get started!

Referencing a Cell in the Same Sheet

This is the most basic level of referencing where you refer to a cell on the same sheet.

For example, if I am in cell B1 and I want to refer to cell A1, the format would be:

=A1

Reference a cell in the same sheet

When you do this, the value in the cell where you use this reference will be the same as that in cell A1. And in case you make any changes in cell A1, these would be reflected in the cell where you have used this reference.

Referencing a Cell in the Another Sheet

If you have to reference another sheet in the same workbook, you need to use the below format:

Sheet_name!Cell_address

First, you have the sheet name followed by an exclamation sign which is followed by the cell reference.

So if you need to refer to cell A1 in Sheet 1, you need to use the following reference:

=Sheet1!A1

And if you want to refer to a range of cells in another sheet, you need to use the following format:

Sheet_name!First_cell:Last_cell

So, if you want to refer to the range A1:C10 in another sheet in the same workbook, you need to use the below reference:

=Sheet1!A1:C10

Note that I have only shown you the reference to the cell or the range. In reality, you would be using these in formulas. But the format of the references mentioned above are going to remain the same

In many cases, the worksheet you refer to would have multiple words in the name. For example, it could be Project Data or Sales Data.

In case you have spaces or non-alphabetical characters (such as @, !, #, -,etc.), you need to use the name within single quotes.

For example, if you want to refer cell A1 in the sheet named Sales Data, you will use the below reference:

='Sales Data'!A1

And in case the name of the sheet is Sales-Data, then to refer to cell A1 in this sheet, you need to use the below reference:

='Sales-Data'!A1

When you refer to a sheet in the same workbook, and then later change the name of the worksheet, you don’t need to worry about the reference breaking down. Excel will automatically update these references for you.

While it’s great to know the format of these references, in practice, it’s not such a good idea to manually type these every time. It would be time-consuming and highly error-prone.

Let me show you a better way to create cell references in Excel.

Also read: How to Sum Across Multiple Sheets in Excel?

Automatically Creating Reference to Another Sheet in the Same Workbook

A much better way to create cell reference to another sheet is to simply point Excel to the cell/range to which you want to create the reference and let Excel create it itself.

This will ensure that you don’t have to worry about the exclamation point or quotes being missing or any other format issue cropping up. Excel will automatically create the correct reference for you.

Below are the steps to automatically create a reference to another sheet:

  1. Select the cell in the current workbook where you need the reference
  2. Type the formula till you need the reference (or an equal-to sign if you just want the reference)
  3. Select the sheet to which you need to refer to
  4. Select the cell/range that you want to refer to
  5. Hit Enter to get the result of the formula (or continue working on the formula)

The above steps would automatically create a reference to the cell/range in another sheet. You will also be able to see these references in the formula bar. Once you’re done, you can simply hit the enter key and it will give you the result.

For example, if you have some data in cell A1:A10 in a sheet named Sales Data, and you want to get the sum of these values in the current sheet, following will be the steps:

  1. Type the following formula in the current sheet (where you need the result): =Sum(Enter the formula to the point where you need the reference
  2. Select the ‘Sales Data’ sheet.
  3. Select the range that you want to add (A1:A10). As soon as you do this, Excel will automatically create a reference to this range (you can see that in the formula bar)Select the range manually for excel to create a reference automatically
  4. Hit the enter key.

When you’re creating a long formula, you may need to refer to a cell or a range in another sheet, and then have a need to come back to the origin sheet and refer to some cell/range there.

When you do this, you will notice that Excel automatically inserts a sheet reference to the sheet where you have the formula. While this is alright and doesn’t harm, it’s not needed. In such a case, you can choose to keep the reference or remove it manually.

Another thing you need to know when creating references by selecting the sheet and then the cell/range is that Excel will always create a relative reference (i.e., references with n0 $ sign). This means that if I copy and paste the formula (one with reference to another sheet) in some other cell, it would automatically adjust the reference.

Here is an example that explains relative references.

Suppose I use the following formula in cell A1 in current sheet (to refer to cell A1 in a sheet name SalesData)

=SalesData!A1

Now, if I copy this formula and paste in cell A2, the formula will change to:

=SalesData!A1

This happens because the formula is relative and when I copy and paste it, the references will automatically adjust.

In case I want this reference to always refer to cell A1 in the SalesData sheet, I will have to use the below formula:

=SalesData!$A$1

The dollar sign before the row and column number lock these references so that these don’t change.

Here is a detailed tutorial where you can learn more about absolute, mixed, and relative references.

Now that we have covered how to reference another sheet in the same workbook, let’s see how we can refer to another workbook.

How to Reference Another Workbook in Excel

When you refer to a cell or a range to another Excel workbook, the format of that reference would depend on whether that workbook is open or closed.

And of course, the name of the workbook and the worksheets also play a role in determining the format (depending on whether you have spaced or non-alphabetical characters in the name or not).

So let’s see the different formats of external references to another workbook in different scenarios.

External Reference to an Open Workbook

When it comes to referring to an external open workbook, you need to specify the workbook name, the worksheet name, and the cell/range address.

Below is the format you need to use when referring to an external open workbook

='[FileName]SheetName!CellAddress

Suppose you have a workbook ‘ExampleFile.xlsx’ and you want to refer to cell A1 in Sheet1 of this workbook.

Below is the reference for this:

=[ExampleFile.xlsx]SalesData!A1

In case there are spaces in the external workbook name or the sheet name (or both), then you need to add put the file name (in square brackets) and the sheet name in single quotes.

Below are the examples where you would need to have the names in single quotes:

='[Example File.xlsx]SalesData'!A1

='[ExampleFile.xlsx]Sales Data'!A1

='[Example File.xlsx]Sales Data'!A1

How to Create Reference to Another Workbook (Automatically)

Again, while it’s good to know the format, it’s best not to type it manually.

Instead, just point Excel in the right direction and it will create these references for you. This is a lot faster with way fewer chances of errors.

For example, if you have some data in cell A1:A10 in a workbook named ‘Example File’ in the sheet named ‘Sales Data’, and you want to get the sum of these values in the current sheet, following will be the steps:

  1. Type the following formula in the current sheet (where you need the result): =Sum(
  2. Go to the ‘Example File’ workbook
  3. Select the ‘Sales Data’ sheet.
  4. Select the range that you want to add (A1:A10). As soon as you do this, Excel will automatically create a reference to this range (you can see that in the formula bar)Creating a reference to another workbook in Excel
  5. Hit the enter key.

This would instantly create the formula with the correct references.

One thing you would notice when creating a reference to an external workbook is that it will always create absolute references. This means that there is a $ sign before the row and column numbers. This means that if you copy and paste this formula to other cells, it would keep referring to the same range due to absolute reference.

In case you want this to change, you need to change the references manually.

External Reference to a Closed Workbook

When an external workbook is open and you refer to this workbook, you just need to specify the file name, sheet name, and the cell/range address.

But when this is closed, Excel has no clue where you look for the cells/range you referred to.

This is why when you create a reference to a closed workbook, you also need to specify the file path.

Below is a reference that refers to cell A1 in the Sheet1 worksheet in the Example File workbook. Since this file is not open, it also refers to the location where the file is saved.

='C:UserssumitDesktop[Example File.xlsx]Sheet1'!$A$1

The above reference has the following parts:

  • File Path – the location on your system or network where the external file is located
  • File Name – the name of the external workbook. This would include the file extension as well.
  • Sheet Name – the name of the sheet in which you are referring to the cells/ranges
  • Cell/Range Address – the exact cell/range address to which you’re referring

When you create an external reference to an open workbook and then closed the workbook, you would notice that the reference automatically changes. After the external workbook is closed, Excel automatically inserts a reference to the file path as well.

Impact of Changing File Location on References

When you create a reference to a cell/range in an external Excel file and then close it, the reference now uses the file path as well.

But then if you change the file location, nothing is going to change in your workbook (in which you create the reference). But since you have changed the location, the link has now been broken.

So if you close and open this workbook, it will tell you that the link is broken and you need to either update the link or break it completely. It will show you a prompt as shown below:

Prompt to tell that the external link is broken

When you click on Update, it will show you another prompt where you can choose the options to edit the links (which will show you the below dialog box)

Edit Link to correct broken references

If you need to keep these files linked, you can specify the new location of the file by clicking on Update Values. Excel opens a dialog box for you where you can specify the new file location by navigating there and selecting it.

Reference to a Defined Name (in the same or external workbook)

When you have to refer to cells and ranges, a better way is to create defined names for the ranges.

This is helpful as it makes it easy for you to refer to these ranges using a name instead of a long and complicated reference address.

For example, it’s easier to use =SalesData instead of =[Example File.xlsx]Sheet1′!$A$1:$A$10

And in case you have used this defined named in multiple formulas and you need to change the reference, you need to only do it once.

Here are the steps to create a named range for a range of cells:

  1. Select all the cells that you want to include in the named range
  2. Click the Formulas tabClick on Formulas
  3. Click on the Define Name option (it’s in the Defined Names group)Click on Define Name option
  4. In the New Name dialog box, give this range a name (I am using the name SalesData in this example). Remember you can’t have spaces in the nameCreate a new named range by specifying the name
  5. Keep the scope as Workbook (unless you have a strong reason to make it sheet-level)Keep the scope as Workbook
  6. Make sure the Refers to the range is correct.Specify the address for the named range
  7. Click OK.

Now your named range has been created and you can use it instead of the cell references with cell addresses.

For example, if I want to get the sum of all these cells in the SalesData range, you can use the below formula:

=SUM(SalesData)

And what if you want to use this named range is other worksheets or even other workbooks?

You can!

You just need to follow the same format we have discussed in the above section.

No need to go back to the beginning of this article. Let me give you all the examples here itself so you get the idea.

Workbook Vs Worksheet Level Named Ranges: When you create a workbook level named range, there could only be one range with that name. So if you refer to it from external workbooks or worksheets in the same workbook, you don’t need to specify the worksheet name (as it’s available for use in the entire workbook). In case you use the worksheet level named range, you will only be able to use it in the worksheet and while referring to it, you will also have to specify the worksheet name.

Referencing the defined name in the same worksheet or workbook

If you have created the defined name for the workbook level, you can use it anywhere in the workbook by just using the defined name itself.

For example, if I want to get the sum of all the cells in the named range we created (SaledData), I can use the below formula:

=SUM(SaledData)

In case you have created a worksheet level named range, you can use this formula only if the named range is created in the same sheet where you’re using the formula.

In case you want to use it on another sheet (say Sheet2), you need to use the following formula:

=SUM(Sheet1!$A$1:$A$10)

And in case there are spaces or alphanumeric characters in the sheet name, you will have to put the sheet name in single quotes.

=SUM('Sheet 1'!$A$1:$A$10)

Referencing the defined name in another workbook (Open or Closed)

When you want to reference a named range in another workbook, you will have to specify the workbook name and then the name of the range.

For example, if you have an Excel workbook with the name ExampleFile.xlsx and a named range with the name SalesData, then you can use the below formula to get the sum of this range from another workbook:

=SUM(ExampleFile.xlsx!SalesData)

In case there are spaces in the file name, then you need to use these in single quotes.

=SUM('Example File.xlsx'!SalesData)

In case you’ve sheet-level named ranges, then you need to specify the name of the workbook as well as the worksheet when referencing it from an external workbook.

Below is an example of referencing a sheet-level named range:

=SUM('[Example File.xlsx]Sheet1'!SalesData)

As I mentioned above as well, it’s always best to create workbook level named ranges, unless you have a strong reason to create a worksheet level one.

In case you’re referencing a named range in a closed workbook, you will have to specify the file path as well. Below is an example of this:

=SUM('C:UserssumitDesktopExample File.xlsx'!SalesData)

When you create a reference to a named range in an open workbook and then close the workbook, Excel automatically changes the reference and adds the file path.

How to Create Reference to a Named Range

If you create and work with a lot of named ranges, it’s not possible to remember each one’s name.

Excel helps you by showing you a list of all the named ranges that you have created and allows you to insert these in formulas with a single click.

Suppose you have created a named range SalesData which you want to use in a formula to SUM all the values in the named range.

Here are the steps to do this:

  1. Select the cell in which you want to enter the formula.
  2. Enter the formula to the point where you need the named range to be insertedEnter the formula to the point where you need the reference
  3. Hit the F3 key on your keyboard. This will open the Paste Name dialog box with the list of all the names you have createdPaste Name Dialog box
  4. Double-click on the name that you want to insert.

The above steps would insert the name in the formula and you can continue to work on the formula.

Note: This technique works only for the name ranges that are in the same workbook. If you want to get the names in an external workbook, you will have to go there, check the name using the Paste Name dialog box and then come back and use it in your formula (in the correct format using the file name).

This is all you need to know about how to reference other sheets or workbooks and how to create an external reference in Excel.

Hope you found this tutorial useful.

You may also like the following Excel tutorials:

  • How to Sum a Column in Excel
  • CONCATENATE Excel Range (with and without separator)
  • Hyperlinks in Excel (A Complete Guide + Examples)
  • How to Find External Links and References in Excel
  • How to Copy and Paste Formulas in Excel without Changing Cell References
  • How to Delete Named Range in Excel?
  • Using A1 or R1C1 Reference Notation in Excel (& How to Change These)

Понравилась статья? Поделить с друзьями:
  • Regex word after word
  • Reference to figures in word
  • Regex string contains word
  • Reference one cell in excel
  • Reference numbers in word