SUM function (with variable?)

nhbcai

New Member
Joined
Jun 28, 2011
Messages
18
Hi there,
I am at the end of my wits with this problem which seems like it should be an easy one.

I want to populate information from a workbook that's not open using the SUM function and a name in the B1 cell:

Cell B1 = fileName.xlsx

Function = :
=SUM('C:\Folder\[B1]Sheet1'!A10:A100)

I haven't got much "advanced" excel knowledge but coming from a bit of programming experience this looks like it should work. B1 is just a variable and I am plugging in the variable.

My Google-fu has resulted in macros and VB stuff I was really hoping to avoid.

Any thoughts?

Thanks!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
There's a major problem with working with closed workbooks. Not all functions can handle them:

Closed workbooks are not much of a problem with SUM or SUMPRODUCT but the only function that I know of that can turn cell values into a range reference would be INDIRECT and it can't handle closed workbooks.

If Excel Addins are not out of the question you could try installing the Morefunc -addin (http://xcell05.free.fr/morefunc/english/) to your Excel. It comes with an advanced INDIRECT-function that should be able handle closed workbooks as well.
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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