Excel 函数
Excel 中的 OFFSET 函数
了解如何在 Excel 中使用 OFFSET 函数,理解其语法、常见用法,以及如何让 ExcelGPT 按你的真实工作簿结构生成或调整公式。
语法
OFFSET(reference, rows, cols, [height], [width])参数
公式各部分的作用说明。
reference必填用于 OFFSET 的参数 reference。说明(原文):The starting reference cell or range.
rows必填用于 OFFSET 的参数 rows。说明(原文):The number of rows to move up or down.
cols必填用于 OFFSET 的参数 cols。说明(原文):The number of columns to move left or right.
height可选用于 OFFSET 的参数 height。说明(原文):Optional height of the returned range.
width可选用于 OFFSET 的参数 width。说明(原文):Optional width of the returned range.
示例
示例 1:OFFSET 用法
=OFFSET(A1, 1, 2)展示 OFFSET 的常见用法。说明(原文):Returns a reference shifted from A1 by one row and two columns.
示例 2:OFFSET 用法
=SUM(OFFSET(B10, -4, 0, 5, 1))展示 OFFSET 的常见用法。说明(原文):Sums a five-row vertical range ending at B10 for rolling-window calculations.
常见错误
确认 OFFSET 的参数顺序、数据类型和引用方向是否正确。
检查引用范围、空值、错误值或数组溢出是否会影响结果。
先在小范围样例上验证,再扩展到完整工作簿。