OFFSET combined with SUM or AVERAGE Formula: =SUM(B4:OFFSET(B4,0,E2-1)) The OFFSET function on its own is not particularly advanced, but when we combine it with other functions like SUM or AVERAGE we can create a pretty sophisticated formula. Suppose you want to create a dynamic function that can sum a variable number of cells. With the regular SUM formula, you are limited to a static calculation, but by adding OFFSET you can have the cell reference move around. How it works: To make this formula work, we substitute ending reference cell of the SUM function with the OFFSET function. This makes the formula dynamic and the cell referenced as E2 is where you can tell Excel how many consecutive cells you want to add up. Now we’ve got some advanced Excel formulas! Below is a screenshot of this slightly more sophisticated formula in action. Add caption As you see, the SUM formula starts in cell B4, but it ends with a variable, which is the OFFSET f
Comments
Post a Comment