|
Home > Formulas > Lookup > OFFSET Excel OFFSET Function Examples
|
The OFFSET function can return a reference to a range. Enter the starting point, the number of rows and columns to move from starting point, and how big a range to include (number of rows and columns)
In this video, you'll see four examples of how to use the OFFSET function. The written instructions are below the video.
Tip: To follow along, download the OFFSET FunctionExamples workbook.
The OFFSET function is volatile, so it could slow down a workbook if used in too many cells.
Instead, you could use a non-volatile function, like INDEX, to return a reference.
The OFFSET function has five arguments: OFFSET(reference,rows,cols,height,width)

With the OFFSET function, you can return a reference to a range, based on a starting reference. In this example, we want the sales amount in cell G2:
Here is the formula in cell G2:
In the screen shot below, OFFSET returns 215, which is the April sales amount

In cell H2, there is a similar OFFSET formula, to return the month name. The only difference is the column offset -- 1 instead of zero.
Note: For this example, the height and width arguments could be omitted, because we want a reference that is the same size as the starting reference. I used them in this example, to show how all the arguments work.
In this example, the OFFSET function returns a reference to the sales amounts for the selected month, and the SUM function returns the total for that range. In cell B10, the selected month number is 3, so the result is the total of the March sales.
Here is the formula in cell C10:

You can also use the OFFSET function to create a dynamic range. In this example, I've created a name, MonthsList, with this formula:

If months are added or removed from the list in column C, those changes will automatically appear in the data validation drop down list in cell F2.
The drop down list uses the dynamic named range, MonthsList, as its source.

In this final example, OFFSET is combined with SUM and COUNT, to show the total for the last n months. As new quantities are added, the formula result will automatically adjust to include the latest months.
In cell E2, the number of months is 2, so the August and September amounts are summed.
Here is the formula in cell F3:

A few years ago, someone asked me to explain the Excel OFFSET function, saying "Please teach me to fish." That's when I realized that using OFFSET is like fishing.
Fishing: There are lots of different ways to fish. For example:
OFFSET: With OFFSET, you can "fish" for data, with adjustable settings, to:
Fishing or OFFSET: In the photo below, from a long-ago camping trip, my dad is holding the catch of the day. So, would you rather catch fish, or use OFFSET, to catch data?

Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.
Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!
Last updated: October 16, 2025 3:52 PM