Over 2 million + professionals use CFI to learn accounting, financial analysis, modeling and more. Unlock the essentials of corporate finance with our free resources and get an exclusive sneak peek at the first module of each course.
Start Free
What is the OFFSET Function?
The OFFSET Function[1] is categorized under Excel Lookup and Reference functions. OFFSET will return a range of cells. That is, it will return a specified number of rows and columns from an initial range that was specified.
In financial analysis, we often use Pivot Tables and Charts. The OFFSET function can be used to build a dynamic named range for pivot tables or charts to make sure that the source data is always up to date.
Reference (required argument) – This is the cell range that is to be offset. It can be either single cell or multiple cells
Rows (required argument) – This is the number of rows from the start (upper left) of the supplied reference, to the start of the returned range.
Cols (required argument) – The number of columns from the start (upper left) of the supplied reference, to the start of the returned range.
Height (optional argument) – Specifies the height of the returned range. If omitted, the returned range is the same height as the supplied reference argument.
Width (optional argument) – This specifies the width of the returned range. If omitted, the returned range is the same width as the supplied reference.
How to Use the OFFSET Function in Excel?
As a worksheet function, the OFFSET function can be entered as part of a formula in a cell of a worksheet. To understand the uses of the function, let us consider a few examples:
Example 1
Let’s say we are given the weekly earnings for 5 weeks below:
Now, if we insert the formula =OFFSET(A3,3,1) in cell B1, it will give us the value 2,500, which is 3 rows down on column right, as shown below:
In the above example, as the height and width of the returned range are same as the reference range, we omitted the reference range.
Example 2
Continuing with the same example, suppose we want the earnings for Thursday for all the weeks. In this scenario, we will use the formula {=OFFSET(B7,3,1,1,5)}.
We get the results below:
In the example above:
As the results of the OFFSET function are to occupy more than one cell, it is necessary to enter the function as an array. It can be seen by the parentheses that surround the formula in the Formula bar.
In the given formula, as the width of the returned range is more than the width of the reference range, we specified the height and width arguments.
Example 3
Continuing with the same example, suppose we want the sum total of the earnings for Week 3. We use the formula =SUM(OFFSET(G6,1,-2,5)).
We get the results below:
In the example above:
The array of values returned by the OFFSET function is directly entered into the SUM function, which returns a single value. Hence, we do not need it to enter as an array formula.
The height of the offset range is greater than the height of the reference range and so the [height] argument is entered as the value 5.
The width of the offset range is the same as the width of the reference range and so the [width] argument was omitted from the function.
A Few Notes About the OFFSET Function
#REF! error – Occurs when the range resulting from the requested offset is invalid. For example, it extends beyond the edge of the worksheet.
#VALUE! error – Occurs if any of the supplied rows, cols, [height] or [width] arguments is non-numeric.
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial modeling. To learn more, check out these additional CFI resources:
To master the art of Excel, check out CFI’s Excel Crash Course, which teaches you how to become an Excel power user. Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.
Take your learning and productivity to the next level with our Premium Templates.
Upgrading to a paid membership gives you access to our extensive collection of plug-and-play Templates designed to power your performance—as well as CFI's full course catalog and accredited Certification Programs.
Gain unlimited access to more than 250 productivity Templates, CFI's full course catalog and accredited Certification Programs, hundreds of resources, expert reviews and support, the chance to work with real-world finance and research tools, and more.