Custom function which references external data

deftones

New Member
Joined
Oct 27, 2010
Messages
10
Parameters which can't change
I use 14 different data sets, which are stored in regression formulas (y=mx+b) in 14 different workbooks. This is equivalent to a couple of 10x10 values tables in each file. These data sets are referenced in ton of workbooks in a various tedious way. I want to streamline this.

My first thought (good thought I think), was to create a custom function which pulls from the appropriate data source based on parameters. I can then save this function as an excel add-in so its available in all workbooks which would use the reference. Bad idea - my mistake is the custom function uses data in closed workbooks, and although I can use vba to open these workbooks, get the data required, and close the workbook behind the scenes, this seems cumbersome and clunky when done on a larger scale.

My next thought is to somehow aggregate the data sets into one txt file that can be stored with the excel add-in. I have no experience in this. Any thoughts from those with experience?

Once implemented, this will affect multiple users over several years, so I want to make sure this is a good solution.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
My next thought is to somehow aggregate the data sets into one txt file

Why not store your data in one of the worksheets of your add-in?

Remember, when you reference an add-in worksheet sheet in the add-in code to use the ThisWorkbook object.
eg.,
Set myRange =
ThisWorkbook.Worksheet("Data").Range("A1:A2") - this references a sheet named Data in the add-in.


 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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