Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions > Lookup and Reference > OFFSET

 

OFFSET(reference, rows, cols [,height] [,width])

 
 Returns the value in the cell which is an offset from a given cell reference.

 referenceThe reference from which you want to base the offset.
 rowsThe number of rows, up or down, for the upper-left cell to refer to.
 colsThe number of columns, to the left or right, for the upper-left cell of the result to refer to.
 heightThe number of rows that you want the returned reference to be.
 widthThe number of columns that you want the returned reference to be.

 REMARKS
 
  • This function is volatile and will change everytime a cell on the worksheet is calculated.
     
  • This function will update when the workbook is recalculated by pressing F9.
     
  • This function returns a reference to a range that is a specified number of rows and columns from a cell or range of cells.
     
  • Reference must be a reference to a cell or range of adjacent cells; otherwise, then #VALUE! is returned.
     
  • 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).
     
  • 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).
     
  • The "height" and "width" must be positive numbers.
     
  • If "height" is left blank, then 1 is used.
     
  • If "width" is left blank, then 1 is used.
     
  • 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.
     
  • This function doesn't actually move any cells or change the selection; it just returns a reference.
     
  • This function 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.

     EXAMPLES
     
     ABC
    1=OFFSET(B1,1,0,1,1) = 428
    2=OFFSET(B1,1,1,1,1) = 10410
    3=OFFSET(C1,2,-1,1,1) = 6612
    4=OFFSET(C3,-2,-1,1,1) = 2  
    5=OFFSET(C2,0,0) = 10  
     

     Functions - O | Index - O | Office Online 

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.Top