# Summing from Closed Workbooks

Problem:

The following formula was created to sum a variable number of values in row 3 of Book1, Sheet1, starting at column A:
=SUM(OFFSET('C:\My Documents\[Book1.xls]Sheet1'!\$A\$3,0,0,1,A2))
However, the formula only works correctly when Book1 is open.
When Book1 is closed, the formula returns #VALUE!.
How can we modify the formula so that it works regardless of whether Workbook1 is open or not?

Solution:

Use the SUM, COLUMN, and INDIRECT functions as shown in the following Array formula:
{=SUM((COLUMN(INDIRECT("A:Z"))<column(indirect("a:a"))+a2)*
IF(ISNUMBER('C:\My Documents\[Book1.xls]Sheet1'!\$A\$3:\$Z\$3),'C:\My Documents\[Book1.xls]Sheet1'!\$A\$3:\$Z\$3))}

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.