OFFSET Function in Microsoft Excel: Syntax, Examples & Compatibility
Learn how to return a cell or rectangular range shifted from a starting cell in Microsoft Excel. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: OFFSET returns a reference shifted from an anchor by a row and column offset. Optional height and width specify its rectangle; omitted dimensions inherit the original reference size. It does not physically move cells.
Availability and version history
- Introduced: Introduction version not established by the official history reviewed.
- Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Checked: October 14, 2026; official OFFSET reference. Documentation check, not a new native test; existing example-verification notes retain their scope.
Syntax and argument defaults
=OFFSET(reference,rows,cols,[height],[width])
The starting reference, row offset and column offset are required. Positive rows move down; negative rows move up. Positive columns move right; negative columns move left. These offsets identify the returned range’s upper-left cell.
Microsoft requires an adjacent-cell reference and documents #VALUE! otherwise. Optional height and width must be positive; if omitted, each inherits the corresponding dimension of the starting reference. Decimal dimensions, zero/negative sizes and every coercion/error case are not certified by this guide.
Set up the original example sheet
Enter B2 = 10, B3 = 42, and B4 = 15. The original anchor is B2. Put output formulas elsewhere so they do not overwrite any inputs or become part of a range they aggregate.
Examples use English names and comma separators. Adapt separators to the workbook locale. All stated values and selected rectangles were independently modeled rather than captured from native Excel.
Worked example 1: preserve the original single-cell offset
=OFFSET(B2,1,0)
Expected output: 42. One row below B2 and zero columns across identifies B3. Because B2 is a one-cell reference, the omitted size defaults also return one cell.
Worked example 2: preserve the original three-row total
=SUM(OFFSET(B2,0,0,3,1))
Expected output: 67. Zero offsets retain B2 as the upper-left cell. Height 3 and width 1 produce B2:B4, whose numeric values total 10+42+15.
SUM consumes the returned reference. OFFSET does not create a separate copy of those values or move the original data into a new location.
Example 3: negative movement stays relative to the anchor
=OFFSET(B4,-2,0)
=OFFSET(B4,-1,0)
Expected values are 10 and 42, from B2 and B3. The row offset is a displacement, not a target row number. An offset of −2 from B4 means row 2; from a different anchor it would identify a different row.
For positive and negative offsets alike, verify the anchor first. A correct displacement applied to the wrong starting reference can return a plausible but unintended value.
Advanced example: omitted dimensions inherit a rectangle
Add C2 = 1, C3 = 2, and C4 = 3 beside the original values.
=SUM(OFFSET(B2:C3,1,0))
The starting reference is two rows by two columns. Moving down one row and omitting dimensions returns B3:C4, still a 2×2 rectangle. Expected sum: 42+2+15+3 = 62.
By contrast:
=SUM(OFFSET(B2:C3,1,0,1,1))
Explicit height 1 and width 1 return only B3, with expected sum 42. Omission does not always mean one cell; it means the original reference’s size.
Advanced example: choose a complete two-dimensional window
Using the same B and C columns:
=SUM(OFFSET(B2,0,0,2,2))
=SUM(OFFSET(B2,0,0,3,2))
Expected results are 55 for B2:C3 and 73 for B2:C4. The first includes 10,1,42,2; the second adds 15 and 3.
Changing the height changes how many rows are included. Changing the column offset instead shifts the rectangle horizontally. Keep movement and size in separate labeled input cells if a report lets readers choose both.
Advanced example: an explicit rolling three-record window
Extend the original numeric B column with B5 = 8 and B6 = 20. Let E2 contain a zero-based starting displacement 0, 1 or 2:
=SUM(OFFSET($B$2,E2,0,3,1))
Expected totals are 67,65,43. The selected ranges are B2:B4, B3:B5 and B4:B6 respectively. The anchor is locked, while E2 selects the starting position.
This example is a three-record window, not inherently three days. It also does not discover the last row or prove that the selected rows are valid observations. Bound E2 to the intended populated range and keep the meaning of each record consistent.
Out-of-grid references and interpretation
Microsoft documents #REF! when offsets cross a worksheet edge. With anchor A1, =OFFSET(A1,-1,0) would request row zero and has that documentation-based error expectation. It does not wrap to the bottom of the worksheet.
A returned range used directly in a cell may interact with array entry or implicit intersection in the actual client. The aggregate examples deliberately pass the reference into SUM, avoiding a claim that every listed Excel version displays multi-cell references identically.
The source’s positive-size requirement should not be expanded into an invented error table for all invalid heights or widths. Those boundary displays remain untested.
Recalculation and alternatives
Microsoft’s performance guidance identifies OFFSET as volatile and often prefers INDEX-based dynamic references. No timing benchmark was run here, so this guide does not promise a particular speedup.
Use INDEX when its reference form fits the design, and keep returned-reference semantics separate from copied values. Recheck ranges and results after workbook conversion rather than assuming compatible function names prove identical behavior.
Related guides and official documentation
Editorial verification: Full manuscript and dedicated Microsoft function body reviewed on October 14, 2026. Original title, date, two worked formulas and input fixtures are preserved, alongside the exact approved lifecycle section. All stated original and added outputs were independently modeled; no native Excel execution, performance benchmark or workbook interchange certification was performed. Unsupported edge cases remain explicit.