logo
Microsoft Excel - Interview Questions and Answers
What is the use of the OFFSET and INDIRECT functions?

Both the OFFSET and INDIRECT functions in Excel are powerful tools that provide flexibility in referencing cells and ranges, but they serve different purposes:


OFFSET Function :

  • Purpose:
    • The OFFSET function returns a reference to a range that is a specified number of rows and columns from a reference cell or range.
    • It's used to create dynamic ranges that can change based on data changes.
  • Key Uses:
    • Dynamic Ranges: Creating ranges that expand or contract as data is added or removed.
    • Moving Ranges: Referencing cells relative to a starting point.
    • Dynamic Charts: Creating charts that automatically update with new data.
    • Calculating Rolling Totals/Averages: Performing calculations on a moving window of data.
  • Important Notes:
    • It is a volatile function, meaning it recalculates whenever the worksheet recalculates, which can slow down large workbooks.


INDIRECT Function:

  • Purpose:
    • The INDIRECT function returns the reference specified by a text string.
    • It allows you to build cell references dynamically using text.
  • Key Uses:
    • Dynamic Sheet References: Referencing cells on different sheets where the sheet name is stored in another cell.
    • Referencing Named Ranges: Using text strings to refer to named ranges.
    • Building Dynamic References: Combining text strings and cell values to create complex references.
    • Working with External References: Though with limitations, it can be used to work with references to other workbooks.
  • Important Notes:
    • It allows you to turn a text string into a valid cell reference.


In Summary:

  • OFFSET is about shifting a range relative to a starting point.
  • INDIRECT is about turning a text string into a cell reference.