How to Use the OFFSET Function in Excel

The OFFSET function allows you to indirectly refer to a cell or a range of cells in Excel. With OFFSET, you can pick a starting reference point, and then input an address to the target cells rather than directly referring to them.

This makes the OFFSET function extremely useful in dynamic Excel spreadsheets. you may use the OFFSET function on its own, but its true potential comes out only when you nest it inside other functions in Excel. Read on to learn all about OFFSET in Excel with three examples.

4

What Is the OFFSET Function in Excel?

The OFFSET function returns a reference to a cell or a range of cells. OFFSET takes five parameters, and its syntax is as below:

OFFSET will take in the position of thereferencecell, and then move from there by the number ofrowsandcols, and then return the reference of the destination cell.

Excel logo on a background

If theheightandwidthparameters are set to greater than one, then a range of cells in that area will be returned. Height and width are two optional parameters. If you leave them blank, OFFSET will read them as 1 and return a single cell reference.

To use OFFSET in Excel, you need to input the three required parameters. Once you set the reference cell, OFFSET will move from that cell to the cells below by the number of therowsparameter. It will move to the right by the number of thecolsparameter.

A sample spreadsheet in Excel

From there on, OFFSET will return a reference to the destination cell. If you set parameters forheightandwidthas well, OFFSET will return references to a range of cells, where the original destination cell will be the upper-left cell.

This might sound complicated on paper, but it’s much easier to understand in action. Let’s see how the OFFSET function performs with a couple of examples.

OFFSET function used to return a range of cells

1. OFFSET Function Example: Referring to a Single Cell

To get things started, let’s use the OFFSET function on its own to get a grasp of how it navigates the spreadsheet. In this example, we have a bunch of numbers in an Excel spreadsheet. We’re going to use the OFFSET function to refer to C4.

When the OFFSET function is used plainly, it will output the content of the destination cell. So we should get the content of cell C4, which is the number five, once we input the formula. Let’s get started.

A practical example of the OFFSET function in Excel

Once you pressEnterand the formula is enacted, the cell will return 5. This is the number from cell C4, so your formula worked! You can also usethe evaluate feature to better understand Excel formulas, such as OFFSET.

2. OFFSET Function Example: Referring to a Range of Cells

Using the two optional parameters, height and width, you can also return a range of cells with the OFFSET function in Excel. Let’s pick up where we left off from the last example.

This time, we’re going to return cells C4 to D9 using OFFSET in Excel. Just like before, we’re going to use A1 as our starting reference point.

Now the cell range C4 to D9 should appear where you put in the formula. The output will be an array.

3. OFFSET Function Example: Compound Formulas

The two examples before this were a warm-up to see how OFFSET works in Excel. OFFSET is usually nested with other Excel functions in practical scenarios. Let’s demonstrate this with a fresh example.

In this example, we have the incomes of a side project throughout the years 2017 to 2021. On the upper side, we have a cell that is supposed to show the total income in given years starting from 2021.

The goal here is to create a dynamic spreadsheet using OFFSET in Excel. When you change the number of years for the total, the formula calculating this value should update as well.

In order to achieve this goal, we’re going to use the OFFSET function along with the SUM function. Rather than referring to the cells directly, we’re going to use OFFSET. This way, we can dynamically get the range of cells that will be incorporated into SUM.

In this example, the year 2021 is in cell H5, and the number of years for the total is in cell C1. We have used custom formatting in the cell containing the years. The actual value is the number of years, and the Years text is a suffix. Let’s start by creating a formula to calculate the total. We’re going to usethe SUM function in Excel.

The number you get as the total now depends on the number of years you’ve input. If the number of years is set to 1, then you will get the total for the year 2021 only.

Notice that the total updates instantly once you change the number of years. If you change the number of years to 7, the SUM function will calculate the total from 2015 to 2021.

Dynamic Spreadsheets With OFFSET

The OFFSET function in Excel has many parameters, and that can cause confusion on its own, but once you get to use it, you’ll learn that, like many other Excel functions, OFFSET is a friendly function.

Though there isn’t much use to OFFSET on its own, when coupled with other Excel functions, OFFSET gives you the power to create dynamic and sophisticated spreadsheets.

Self-updating Excel charts are huge timesavers. Use these steps to add new data and watch them automatically show up in a chart.

When your rival has to bail out your assistant.

You don’t need to fork out for expensive hardware to run an AI on your PC.

Unlock a world of entertainment possibilities with this clever TV hack.

My iPhone does it all, but I still need my dumb phone.

Every squeak is your PC’s way of crying for help.

Technology Explained

PC & Mobile