Formula to support multiple workbook data, INDIRECT.EXT, YTD

Walking Shorts

New Member
Joined
Nov 23, 2005
Messages
17
I need to make a formula to reference data in cells from various worksheets and total that data which aslo includes the INDIRECT.EXT function and will also ignore if certian workbooks are not avaiable. I'll try to explain a little better-

I am making a workbook to gather data from other workbooks, each workbook representing stats collected for certian months and certian years. For example, the workbook named dejan05.xls contains the data(d) entered(e) from January(jan) 2005(05), so defeb05.xls would have the data from February 2005 and so forth. The data I need from each workbook is contained on the worksheet title Monthly, and is in cell D6.

the formula also needs to gather the filename based on what year is typed in by the user in cell C1, so if they type in 2004 into cell C1, the data will be gathered from the workbooks that are from that year only (dejan04.xls, defeb04.xls, demar04.xls, etc). This part I don't really need too much help with, I'm just mentioning it so you know why I need the INDIRECT.EXT function in the formula. More or less I've got the basic filenames showing up
in cells F2 to F13 (dejan to dedec) formulated so that they change based on what year is typed into C1, and also include the name of the worksheet I need the data from as well, the code looks like this-

="[dejan"&(RIGHT($C$1,2))&".xls]Monthly'!" - So basically what shows up in the cell (F2 in this example, and assuming 2005 is in cell C1) is [dejan05.xls]Monthly'!

So now I can type in something like =INDIRECT.EXT("'\\Path\Name\"&F2&"D6") and have the data from cell D6 on the sheet titled Monthly from the workbook named dejan05.xls appear. But that's about when I get stuck. I know I could get the total from all the sheets of that year by simply using SUM or even just + to add it all up, but I need the formula to support the fact that I may not have ALL the workbooks avaiable, such as this year since I would have no data for December yet, or half way through next year I may need the year to date totals, or maybe I just have no workbook for March of 2003 because there were no stats to gather for that month. My current formula doesn't work because if the workbook for a certian month is missing, the result that turns up in the cell is #VALUE because it can't find that workbook.

So, I need a formula that will ignore if some workbooks missing and just give me the totals from the workbooks of that year that are available. Any ideas?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
:confused: Can someone at least tell me if what I'm asking is impossible so I can stop rackin' my brain trying to figure this out?

Not tryin' to be rude or pushy or anything, just asking. :)
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,575
Members
449,039
Latest member
Arbind kumar

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