Lookup & Reference
All versions
◉ 51 views
Volatile
=OFFSET()
Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and the number of columns to be returned.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=OFFSET(reference, rows, cols, [height], [width])
Hover argument names in the table for details.
Output typeReference
Popularity60 / 100
VolatileYes
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =OFFSET() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
reference |
Reference | Required | The reference from which you want to base the offset. Reference must refer to a cell or range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. |
rows |
Number | Required | The number of rows, up or down, that you want the upper-left cell to refer to. Using 5 as the rows argument specifies that the upper-left cell in the reference is five rows below reference. Rows can be positive (which means below the starting reference) or negative (which means above the starting reference). |
cols |
Number | Required | The number of columns, to the left or right, that you want the upper-left cell of the result to refer to. Using 5 as the cols argument specifies that the upper-left cell in the reference is five columns to the right of reference. Cols can be positive (which means to the right of the starting reference) or negative (which means to the left of the starting reference). |
height |
Number | Optional | The height, in number of rows, that you want the returned reference to be. Height must be a positive number. |
width |
Number | Optional | The width, in number of columns, that you want the returned reference to be. Width must be a positive number. |
▣ Examples
Displays the value in cell B6 (4)
=OFFSET(D3,3,-2,1,1)
Result:
4
Sums the range B6:D8
=SUM(OFFSET(D3:F5,3,-2, 3, 3))
Result:
34
Returns an error, because the reference is to a non-existent range on the worksheet.
=OFFSET(D3, -3, -3)
Result:
#REF!
§ Remarks
- If rows and cols offset reference over the edge of the worksheet, OFFSET returns the #REF! error value.
- If height or width is omitted, it is assumed to be the same height or width as reference.
- OFFSET doesn't actually move any cells or change the selection; it just returns a reference. OFFSET can be used with any function expecting a reference argument. For example, the formula SUM(OFFSET(C2,1,2,3,1)) calculates the total value of a 3-row by 1-column range that is 1 row below and 2 columns to the right of cell C2.
✦ Tips
- If height or width is omitted, it is assumed to be the same height or width as reference.
- OFFSET doesn't actually move any cells or change the selection; it just returns a reference. OFFSET can be used with any function expecting a reference argument. For example, the formula SUM(OFFSET(C2,1,2,3,1)) calculates the total value of a 3-row by 1-column range that is 1 row below and 2 columns to the right of cell C2.
⚠ Common Errors
#REF!
If rows and cols offset reference over the edge of the worksheet, OFFSET returns the #REF! error value.
Fix: Check the offset numbers and the size of the range
#VALUE!
Reference must refer to a cell or range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
Fix: برای Reference یک ارجاع معتبر به سلول یا محدوده پیوسته وارد کنید.
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!