The OFFSET function in Excel returns a reference to a range that is a specified number of rows and columns from a starting cell or range. It is useful for creating dynamic ranges, building flexible formulas, and referencing data that shifts based on inputs—such as rolling averages, moving summaries, or charts that update automatically.

What You'll Need

  • Microsoft Excel (any recent version: Excel 2010 or later, including Excel for Microsoft 365)
  • A worksheet with data to reference (e.g., sales figures, time series, or lists)
  • Basic understanding of Excel formulas and cell references

Step-by-Step

  1. Identify your starting point: Choose the cell that will serve as the anchor for your OFFSET calculation. For example, if you want to start from cell A1, this is your reference point.
  2. Determine the offset values: Decide how many rows and columns you want to move from the starting point. A positive row offset moves down; a negative one moves up. A positive column offset moves right; a negative one moves left.
  3. Specify the height and width (optional): If you want OFFSET to return a range larger than a single cell, define how many rows (height) and columns (width) the returned range should include. If omitted, Excel assumes a height and width of 1.
  4. Write the OFFSET formula: In a blank cell, type =OFFSET(reference, rows, cols, [height], [width]). Replace each argument:
    • reference: The starting cell (e.g., A1)
    • rows: Number of rows to move (e.g., 2 to move down two rows)
    • cols: Number of columns to move (e.g., 1 to move right one column)
    • [height]: Number of rows in the returned range (e.g., 3 for a 3-row range)
    • [width]: Number of columns in the returned range (e.g., 2 for a 2-column range)
  5. Press Enter: Excel will return the value from the top-left cell of the range defined by OFFSET. If you want to see the full range, you may need to use OFFSET inside another function like SUM or AVERAGE.
  6. Use OFFSET in a practical example: Suppose you have monthly sales in B2:B13 (Jan to Dec). To calculate the average of the last 3 months, assuming the current month is in B13, use =AVERAGE(OFFSET(B13,-2,0,3,1)). This starts at B13, moves up 2 rows (to B11), and averages B11:B13.
  7. Create a dynamic range for a chart: Define a named range using OFFSET. Go to Formulas > Name Manager > New. Name it SalesData, then set Refers to: =OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B),1). This creates a range that starts at B2 and extends down as far as there are entries in column B.
  8. Use the named range in a chart: Insert a chart, then right-click the data series and choose Select Data. Edit the series values to refer to the named range (e.g., =Sheet1!SalesData). The chart will now update automatically as new data is added.

Common Mistakes

  • Forgetting that OFFSET returns a reference, not a value: Using OFFSET alone in a cell will return the value of the top-left cell in the range, which can be confusing if you expect to see multiple values.
  • Using negative heights or widths: OFFSET does not allow negative values for height or width—doing so returns a #VALUE! error.
  • Moving outside the worksheet boundaries: If the offset causes the reference to go beyond column XFD or row 1,048,576, Excel returns a #REF! error.
  • Assuming OFFSET updates automatically when rows are inserted: While OFFSET is volatile and recalculates when the sheet changes, it does not adjust for inserted/deleted rows unless the reference point or offset values are tied to dynamic elements like COUNTA or MATCH.
  • Overusing OFFSET in large worksheets: Because OFFSET is volatile, it recalculates every time any change is made in the workbook, which can slow performance in complex models.

Tips

  • Combine OFFSET with COUNTA to create truly dynamic ranges that grow or shrink as data is added or removed.
  • Use OFFSET inside SUM, AVERAGE, MAX, or MIN to perform calculations on shifting ranges without manually adjusting formulas.
  • For horizontal data, adjust the column offset and width arguments accordingly—for example, =OFFSET(A1,0,2,1,3) returns a 1-row, 3-column range starting two columns to the right of A1.
  • Test your OFFSET formula with the F9 key: Select the OFFSET portion in the formula bar and press F9 to see what array or value it returns.
  • Consider using INDEX instead of OFFSET for non-volatile dynamic ranges when possible, as INDEX is not volatile and calculates faster.
  • Label your inputs clearly: If you're building a template where users change the number of periods (e.g., for a rolling average), place that input in a visible cell and reference it in your OFFSET formula.

Troubleshooting

  • If you get a #REF! error: Check that your row and column offsets don't push the reference beyond the worksheet edges. Reduce the offset values or change the starting point.
  • If you get a #VALUE! error: Verify that the height and width arguments (if used) are positive numbers. Also ensure that the reference is a valid cell or range.
  • If the result seems incorrect: Use the Evaluate Formula tool (Formulas > Evaluate Formula) to step through how Excel is calculating each part of the OFFSET function.
  • If the range isn't expanding as expected: Double-check that COUNTA or other helper functions are referencing the correct column and that there are no blank cells interrupting the count.
  • If performance is slow: Reduce the number of volatile OFFSET functions, or replace them with INDEX-based alternatives where feasible.
  • If a chart isn't updating: Confirm that the named range uses a formula (not a fixed range) and that the workbook is set to automatic calculation (Formulas > Calculation Options > Automatic).

Frequently Asked Questions

Can OFFSET return multiple values?

Yes, OFFSET can return a range of multiple cells, but to see or use more than the top-left value, it must be nested inside another function like SUM, AVERAGE, or used to define a named range.

Is OFFSET the same as INDEX?

No. While both can return cell references, OFFSET is based on a starting point and offset rows/columns, whereas INDEX returns a value at a specific row and column within a given range. INDEX is not volatile, making it more efficient for large sheets.

Why does my OFFSET formula break when I insert a row?

If your starting reference or offset values are fixed numbers (e.g., =OFFSET(A1,5,0)), inserting a row above A1 shifts the data but not the formula, so it may now point to the wrong data. Use dynamic references like COUNTA to make it resilient.

Can I use OFFSET to refer to a range on another worksheet?

Yes. Simply include the sheet name in the reference—for example, =OFFSET(Sheet2!$A$1,2,3,1,1) refers to the cell two rows down and three columns right of A1 on Sheet2.

Does OFFSET work in Excel for the web or mobile?

Yes, the OFFSET function is supported in Excel for the web and Excel mobile apps (iOS and Android), with the same syntax and behavior as the desktop version.

Is OFFSET affected by hidden rows or columns?

No. OFFSET counts physical rows and columns regardless of whether they are hidden, filtered, or grouped. It does not skip hidden cells in its calculation.