SUMIF With "Indirect" link to closed workbook

rehanahmad

New Member
Joined
Jan 12, 2011
Messages
23
Office Version
  1. 2019
  2. 2016
Hello all
I want to use a combination of Sumif and Indirect function to link to data in closed workbook in a folder location. I have wrote =SUMIF(INDIRECT("'["&Sheet2!C9&".xlsx"&"]"&Sheet2!D9&"'!"&"T:T"),BB14,INDIRECT("'["&Sheet2!C9&".xlsx"&"]"&Sheet2!D9&"'!"&"H:H")), where Sheet2!C9 and Sheet2!D9 are cells reference to file locations and sheet name respectively. The formula is giving "#REF!", can someone see what is wrong with the formula?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Neither SUMIF nor INDIRECT will work with a closed workbook.
 
Upvote 0
Neither SUMIF nor INDIRECT will work with a closed workbook.
Dear RoryA
Thanks for your messages. SUMIF is already working with closed workbook, its just when I factor in the INDIRECT, it falls over.
 
Upvote 0
No, it doesn't. If the SUMIF recalculates while the source workbook is closed, it won't work. None of the xxxIF functions work with closed workbooks.
 
Upvote 0
No, it doesn't. If the SUMIF recalculates while the source workbook is closed, it won't work. None of the xxxIF functions work with closed workbooks.
Let me explain a bit more may be, my SUMIF is currently pulling data from another workbook via formula is below:
SUM(IF('E:\Bridge\ABC\Final Submitted\Q423\[ifrs_XEL_paa_ins 17.01.2024 _Batch 68.xlsx]T_INS_CO_IF'!$T:$T=D$10,'E:\Bridge\ABC\Final Submitted\Q423\[ifrs17_XEL_paa_ins 17.01.2024 v2_Batch.xlsx]T_INS_CO_IF'!$H:$H)) which is working fine whether the other workbook is open or not. Its only when I try to factor in the INDRECT function it doesnt like.
 
Upvote 0
Again, SUMIF will not calculate against a closed workbook; it never has. It will retain values between calculations, but if anything causes that formula to recalculate while the source workbook is closed, it will return an error. INDIRECT also will not work with a closed workbook and because it is volatile (i.e it will recalculate any time Excel calculates), it will inevitably refresh while the source workbook is closed, and cause errors. Neither function should be used with closed workbooks.
 
Upvote 0
To prove it isn't working, open your workbook with the SUMIF formula (the one that you say works) and press F9 to force a calculation.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top